Before an advertiser buys an ad on your website, their buying platform checks one small text file: yourdomain.com/ads.txt. If the company trying to sell your ad space is listed there, the bid goes ahead. If it is not, many buyers simply walk away, without an error message, without an email, without anything in your dashboard except lower numbers.
That makes ads.txt one of the most important files on a monetized website, and also one of the most neglected. This guide explains what it does, how to write it correctly and how to keep it from silently costing you money.
What ads.txt is and why it exists
Ads.txt stands for Authorized Digital Sellers. It is a public list, published by you, of every company allowed to sell your ad inventory. It was introduced by the IAB Tech Lab to fight a simple but expensive fraud: criminals pretending to sell ad space on well-known websites, taking advertisers' money and showing the ads somewhere else entirely.
Because only you can place a file on your own domain, ads.txt gives buyers a reliable way to check that a seller really represents you. Most large buyers now treat a missing or incomplete ads.txt as a reason not to bid.
The format, line by line
Each line in ads.txt describes one authorized seller account and has three required fields and one optional field, separated by commas:
exampleadnetwork.com, pub-1234567890, DIRECT, f08c47fec0942fa0
another-exchange.com, 55501, RESELLER
| Field | Meaning |
|---|---|
| 1. Domain | The domain of the advertising system, for example the ad network or exchange. |
| 2. Account ID | Your publisher account ID inside that system. It must match exactly. |
| 3. Relationship | DIRECT if you control the account yourself; RESELLER if a partner sells your inventory through their own account. |
| 4. Certification ID (optional) | An ID from a certification authority such as the Trustworthy Accountability Group (TAG), identifying the advertising system. |
Lines that start with # are comments and are ignored. Blank lines are fine.
DIRECT or RESELLER?
This is the field publishers get wrong most often. Ask one question: whose account is it?
- If you signed up with the network yourself and the ID is your own account, use DIRECT.
- If a mediation platform or agency sells your inventory through their account with that network, use RESELLER, exactly as they tell you.
Mislabeling a line can make buyers treat the path as unauthorized. Copy the lines your partners give you exactly as provided.
How to create ads.txt, step by step
- Collect the lines. Every ad network and mediation platform you use provides the lines you need. Gather them all in one place.
- Create a plain text file named exactly
ads.txt, in lowercase. Use a plain text editor, not a word processor. - Paste one seller per line. Keep the order of the fields and the commas exactly as given.
- Upload it to the root of your domain, so it opens at
https://yourdomain.com/ads.txt. On WordPress, a plugin or your host's file manager can place it there. - Open the URL in a browser and check that the file loads as plain text with no login page, no redirect loop and no HTML around it.
- Check both versions of your domain. If readers can reach your site at both
wwwand the bare domain, make sure ads.txt is reachable for the domain your ad tags declare.
The most common ads.txt errors
| Problem | What happens | Fix |
|---|---|---|
| File missing or in a subfolder | Buyers find nothing and many stop bidding | Place it at the domain root |
| A partner's lines are missing | That partner's demand drops without warning | Add every line each partner gives you |
| Wrong account ID | The line does not match the seller, so it counts as unauthorized | Copy IDs exactly; do not retype them |
| DIRECT and RESELLER swapped | Buyers may reject the path | Use the relationship your partner specifies |
| File served as HTML or behind a login | Crawlers cannot read it | Serve it as plain text, publicly |
| Old lines never removed | Not harmful by itself, but hides real problems | Review the file whenever partners change |
What about sellers.json?
Ads.txt is your side of the check. sellers.json is the ad system's side: a public file where each network lists the sellers in its system. Buyers compare both files to confirm that the path from your site to the ad is legitimate. You do not publish sellers.json yourself, but it is one more reason to use the exact account IDs your partners give you.
Keeping ads.txt current without manual edits
When you work with a mediation platform, the list of demand partners can change as new networks are added. Editing the file by hand every time is easy to forget. Two common solutions:
- A plugin that pulls the lines for you, if your site runs on WordPress.
- A hosted ads.txt with a redirect. Your platform keeps an always-current file, and your own
/ads.txtredirects to it. The specification permits this, so buyers follow it normally.
How to check your ads.txt is working
- Open
https://yourdomain.com/ads.txtin a private browser window. - Confirm every partner's lines are present and match the IDs in your partner dashboards.
- Watch your fill rate for the following week. A healthy, complete ads.txt usually shows up as steadier fill.
How Advorex Media helps
Every approved site in your Advorex Media dashboard shows the exact ads.txt lines it needs, ready to copy, along with a hosted ads.txt address you can redirect to so the list stays current as demand partners change. Ads.txt is also part of the site checklist you see while setting up, alongside your ad units and code. For the bigger picture of how buyers judge traffic quality, read our guide to invalid traffic.
Key takeaways
- Ads.txt lists who is allowed to sell your ads; buyers check it before bidding.
- Each line is domain, account ID, DIRECT or RESELLER, and an optional certification ID.
- Missing lines, wrong IDs and files in the wrong place are the most common and most costly mistakes.
- Update ads.txt the same day your partners change, or use a hosted file that updates itself.
Frequently asked questions
Where exactly does ads.txt go?
At the root of your domain, so it opens at https://yourdomain.com/ads.txt. A file in a subfolder is not read by buyers.
How long until ads.txt changes take effect?
Buyers re-crawl ads.txt on their own schedule, commonly within a day or two. Changes are not instant, so update the file before you start sending traffic through a new partner.
Can I redirect ads.txt to a file hosted elsewhere?
Yes. The ads.txt specification allows a redirect, as long as it stays within the same domain or goes to the domain that manages your ads.txt. Many publishers use a hosted file so partner lines stay current automatically.
Do I need app-ads.txt?
Only if you publish mobile apps. app-ads.txt is the equivalent file for apps and lives on the developer website listed in the app store.
Turn these tips into revenue
Advorex Media puts several ad networks in competition for every impression on your site, with one lightweight tag and a dashboard that shows the real numbers.
Create your free account →