What Is ads.txt and Why Every Publisher Needs It
ads.txt stands for “Authorized Digital Sellers”. It is a plain text file that sits at the root of your domain, for example example.com/ads.txt, and lists every company that is allowed to sell advertising on your site. The standard was created by the IAB Tech Lab to fight ad fraud, and today most buyers expect it.
The problem it solves
In programmatic advertising, ad space is bought and sold automatically through many intermediaries. Fraudsters used to pretend to sell inventory on popular sites they did not own. Advertisers paid for impressions that never appeared on the real site. With ads.txt, a buyer can check your file and confirm that the seller offering your inventory is genuinely authorized by you.
The format
Each line describes one authorized seller and contains up to four fields separated by commas:
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
- Domain of the ad system: for example
google.com. - Publisher account ID: your ID in that system, such as your AdSense publisher ID.
- Relationship:
DIRECTif you control the account,RESELLERif a partner sells on your behalf. - Certification authority ID: an optional identifier for the ad system. Google’s is
f08c47fec0942fa0.
Lines starting with # are comments. You can list as many sellers as you work with.
How to create it
- Open a plain text editor and add one line per authorized seller.
- Save the file as
ads.txt, all lowercase. - Upload it to the root folder of your website so it opens at
yourdomain.com/ads.txt. - Open that address in a browser to confirm it loads as plain text.
On WordPress you can upload the file with your hosting file manager or use a plugin that manages ads.txt for you.
Common mistakes
- Wrong location: the file must be at the root domain, not in a subfolder.
- Typos in your publisher ID: a single wrong digit makes the line useless.
- Redirect problems: if
httpandwwwversions do not redirect cleanly to the file, crawlers may not find it. - HTML instead of text: the server should return the file as
text/plain, not wrapped in a web page. - Forgetting to update it: when you join or leave an ad network, change the file the same day.
How long until it is recognized?
Ad systems crawl ads.txt files periodically. After you publish or change the file, it can take a few days before your ad network dashboard shows the new status. During that time you may still see a warning; that is normal.
Related standards
app-ads.txt does the same job for mobile apps, and sellers.json is published by ad systems to list the sellers they work with. Together they make the advertising supply chain more transparent, which in the long run means more trust and better prices for honest publishers.
