In the world of digital advertising, transparency is key. If you’ve ever wondered what is ads.txt and why it appears on so many websites, this guide explains everything you need to know. Created by the IAB Tech Lab, the Authorized Digital Sellers initiative helps fight ad fraud, protect publishers, and ensure advertisers know exactly where their money is going.
1. What is ads.txt?
The ads.txt file (Authorized Digital Sellers) is a plain text file placed at the root of your domain. It publicly lists all companies authorized to sell your ad inventory. This simple step helps prevent domain spoofing, a common form of ad fraud where malicious actors impersonate legitimate websites to sell fake ad space.
2. Why ads.txt Matters
- Combats ad fraud by making your authorized sellers public.
- Increases transparency in the programmatic advertising ecosystem.
- Required by major ad platforms like Google AdSense and Google Ad Manager.
3. How ads.txt Works
When an advertiser or ad exchange wants to buy your inventory, they first check your ads.txt
file. Each line in the file declares a trusted seller and contains four fields:
domain, publisher ID, relationship type, certification authority ID
For example:
google.com, pub-1234567890123456, DIRECT, f08c47fec0942fa0
- domain: The advertising system’s domain (e.g., google.com).
- publisher ID: Your unique account ID with that platform.
- relationship type:
DIRECT
if you have a direct contract,RESELLER
if another company sells on your behalf. - certification authority ID: Optional identifier provided by the IAB.
4. Example of an ads.txt File
# Example ads.txt
google.com, pub-1234567890123456, DIRECT, f08c47fec0942fa0
appnexus.com, 9876, RESELLER, f08c47fec0942fa0
openx.com, 54321, DIRECT, 6a698e2ec38604c6
5. How to Create and Implement ads.txt
- Create a plain text file named
ads.txt
. - Add one line per authorized seller, following the format above.
- Upload it to the root of your domain (
https://yourdomain.com/ads.txt
). - Test the file by opening it in your browser.
- Update it whenever your advertising partners change.
6. Common Mistakes to Avoid
- Using incorrect publisher IDs or domains.
- Placing the file in the wrong location (must be root-level).
- Forgetting to remove outdated or unauthorized partners.
- Not keeping the file updated when contracts change.
7. Conclusion
Understanding what is ads.txt is crucial for any publisher engaged in programmatic advertising. By implementing it correctly, you not only protect your revenue but also build trust with advertisers. It’s a simple, low-maintenance step that can have a big impact on your digital advertising success.