ads.txt explained: setup, validation, and common mistakes

What ads.txt is, why Google AdSense needs it, the exact line format, and the top mistakes that break ad serving.

April 10, 2026·5 min read·AdSense Ace Team
ads.txt
AdSense
Technical

ads.txt (Authorized Digital Sellers) is an IAB standard that lets publishers publicly declare which companies can sell their inventory. Missing or invalid ads.txt files cause "Earnings at risk" warnings inside AdSense.

The exact format

adSystemDomain, publisherId, relationship, certificationAuthorityId

For AdSense:

google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

Where it goes

The file must be served as plain text at https://yourdomain.com/ads.txt — the root, not a subdirectory.

Top mistakes

  • Wrong content type (HTML instead of text/plain).
  • Using the wrong publisher ID format (missing pub- prefix).
  • Duplicate lines.
  • Hosting on subdomains without separate ads.txt for each.

Validate yours

Run our free ads.txt validator to fetch and parse yours line-by-line.

Ready to apply? Run a free AdSense readiness scan →