If you show ads on your website, there's a small text file that has a surprisingly large effect on what you earn: ads.txt. Get it right and buyers can trust your inventory. Get it wrong and some of them quietly stop bidding, and nothing on your site will tell you why.
This guide explains what ads.txt is, what each line means, the mistakes that cost publishers money, and how to check your own file in a few minutes.
What ads.txt is, in one paragraph
ads.txt stands for Authorized Digital Sellers. It's a public text file at the root of your domain (for example example.com/ads.txt) that lists every company allowed to sell your ad inventory. The standard was created by the IAB Tech Lab in 2017 to fight a specific kind of fraud: people pretending to sell ads on well-known websites they had nothing to do with. Buyers check the file before they bid. If a seller isn't listed, many buyers simply won't buy from them.
Why it affects your revenue
Before ads.txt, a buyer had no easy way to tell whether the company offering an impression "on example.com" really had the right to sell it. Fraudsters took advantage of this by spoofing domains: they faked impressions on premium sites and pocketed the money.
ads.txt fixed that by letting the publisher, you, publish the list of authorized sellers. Today most major demand-side platforms check ads.txt, and many will not bid on inventory from a seller that isn't in your file.
That has a direct consequence: if one of your ad partners is missing from your ads.txt, its demand for your site may drop to almost nothing. You won't get an error, just lower fill and lower revenue from that partner. That's why ads.txt problems are so easy to miss.
What a line in ads.txt means
Each line in the file describes one authorized seller account. A typical line looks like this:
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
It has up to four fields, separated by commas:
- The ad system's domain: the exchange or SSP, for example
google.com. - Your account ID with that system: the publisher or seller ID the exchange gave you, or gave the company selling on your behalf.
- The relationship:
DIRECTorRESELLER. - The certification authority ID (optional): an ID for the ad system, issued by the Trustworthy Accountability Group (TAG).
DIRECT vs. RESELLER
This is the part people most often get wrong.
- DIRECT means you (the site owner) control the account directly. You signed up with that exchange yourself.
- RESELLER means another company, such as an ad network or a managed partner, is selling your inventory through its account on that exchange.
If you work with an ad network, most of its lines will be RESELLER, because you're selling through the network's accounts. Marking those as DIRECT when they aren't is a common mistake, and it can make buyers treat the inventory as suspicious.
Variables at the top of the file
ads.txt version 1.1 added a few optional variables, such as:
OWNERDOMAIN=example.com: the business domain of the company that owns the site.MANAGERDOMAIN=partner.com: the domain of a company that manages your inventory.
They're not required everywhere, but they help buyers connect the dots between your site and the companies selling it.
How ads.txt connects to sellers.json
ads.txt is one half of a pair. The other half is sellers.json, a file that each exchange or ad system publishes listing the sellers in its system.
A buyer can check both sides:
- Your ads.txt says: "This exchange account is allowed to sell my inventory."
- The exchange's sellers.json says who that account belongs to, and whether it's a publisher or an intermediary.
When the two match, the buyer can trace the supply chain from the ad back to your site. When they don't, for example if an ID in your ads.txt doesn't appear in the exchange's sellers.json, buyers may treat the inventory as lower quality.
The ads.txt mistakes that cost money
These are the problems we see most often:
1. Missing lines for a partner. You added a new network or bidder but never updated ads.txt. The partner's demand won't buy properly until you do.
2. Old lines from partners you've left. Not usually harmful on their own, but they make the file harder to audit and can authorize sellers you no longer work with.
3. Typos and formatting errors. An extra space in an ID, a missing comma, smart quotes copied from a document, or the wrong relationship type can make a line invalid.
4. The file isn't where buyers look. It must be at the root of the domain, for example example.com/ads.txt, served as plain text over HTTP or HTTPS. If it redirects strangely, sits in a subfolder or returns an error page, crawlers may not read it.
5. www vs. non-www confusion. If your site redirects between www.example.com and example.com, make sure the file is reachable on the domain you actually serve ads on.
6. Your CMS or a plugin overwrites it. Some WordPress plugins and site builders manage ads.txt for you. If two of them fight over it, or an update resets it, lines can disappear without warning.
7. Assuming changes apply instantly. Buyers and exchanges crawl ads.txt on their own schedules. After you fix the file, it can take a few days for everyone to pick up the change.
How to check your ads.txt in five minutes
- Open the file in a browser: go to
yourdomain.com/ads.txt. It should load as plain text with no login, no redirect loop and no HTML page. - List your partners. Write down every network, exchange and bidder you currently work with.
- Ask each partner for their required lines, or check their documentation. Make sure every one of them is in the file exactly as given.
- Check DIRECT and RESELLER on each line against what your partner told you.
- Remove partners you no longer work with.
- Check both www and non-www if your site uses both.
- Keep a copy so you can spot it if something changes it later.
Most ad networks give you a single block of lines to paste in. If your partner can also show you whether your live file matches what they need, use it. It catches problems before they cost you.
ads.txt and header bidding
ads.txt matters even more when you use header bidding. With header bidding, several exchanges compete for every impression, and each one needs its own correct lines in your ads.txt. One missing exchange means one less buyer in the auction, which is exactly the kind of loss that header bidding is supposed to prevent.
The more partners you work with, the more important it is to keep the file tidy and checked.
How Dokira handles ads.txt
When you join Dokira, you add our lines to your ads.txt once. That covers Google AdX and our header bidding partners. Your publisher dashboard shows the exact lines your site needs, and we check your live file against them every day, so you can see straight away if something is missing.
If we add a new demand partner later, its lines show up in the dashboard as missing, ready to copy, so you don't have to work it out yourself.
FAQ
Is ads.txt required?
It isn't a law, but in practice it's required. Many buyers won't bid on inventory without a valid ads.txt entry, and most ad networks require you to add their lines before they serve ads.
Where do I put my ads.txt file?
At the root of your domain, so it loads at yourdomain.com/ads.txt. On WordPress, you can upload it to the site's root folder or use a plugin that manages it, but only use one method.
What's the difference between ads.txt and app-ads.txt?
They work the same way. app-ads.txt is the version for mobile apps. The developer publishes it on the website listed in the app store.
How long does it take for ads.txt changes to work?
Usually a few days. Exchanges and buyers recrawl the file on their own schedules.
Can a wrong ads.txt file hurt my SEO?
No. Search engines don't use ads.txt for rankings. It only affects advertising.
Next step
If your site gets around 500,000 monthly pageviews or more and you'd like a partner that handles demand, header bidding and the ads.txt details for you, apply to Dokira. One form and your domain is all we need. A person reviews every site.