April 11, 2024

Understanding ads.txt: A Complete Guide

Learn everything you need to know about ads.txt files and why they're crucial for your website's ad revenue.

What is ads.txt?

ads.txt (Authorized Digital Sellers) is a simple, flexible, and secure method that publishers and distributors can use to publicly declare the companies they authorize to sell their digital inventory. Created by the IAB Tech Lab, it's a text file that publishers place on their web servers to declare who is authorized to sell their ad inventory.

Why is ads.txt Important?

ads.txt helps prevent unauthorized inventory sales and domain spoofing, which can lead to:

  • Lost revenue for publishers
  • Brand safety concerns for advertisers
  • Reduced trust in the digital advertising ecosystem

How ads.txt Works

The ads.txt file contains a list of authorized sellers, with each line following this format:

DOMAIN, PUBLISHER_ID, RELATIONSHIP_TYPE, CERTIFICATION_ID

Example ads.txt Entry

google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

Key Components Explained

  1. DOMAIN

    The domain of the advertising system. For example, google.com for Google AdSense.

  2. PUBLISHER_ID

    Your unique publisher ID from the advertising system.

  3. RELATIONSHIP_TYPE

    Either DIRECT or RESELLER, indicating the type of relationship.

  4. CERTIFICATION_ID

    An optional field containing the certification ID from the advertising system.

Best Practices for ads.txt

  • Keep your ads.txt file up to date
  • Include all authorized sellers
  • Use the correct format
  • Place the file in your root directory
  • Regularly audit your ads.txt file

Common Mistakes to Avoid

  • Incorrect file location
  • Missing authorized sellers
  • Formatting errors
  • Outdated information
  • Incorrect publisher IDs

Conclusion

Implementing ads.txt is a crucial step in protecting your ad revenue and maintaining a healthy digital advertising ecosystem. By following the best practices and avoiding common mistakes, you can ensure that your inventory is only sold through authorized channels.

Ready to Create Your ads.txt File?

Use our Website ads.txt Generator to create your file in seconds.

Generate Your ads.txt