ads.txt for publishers: placement, validation and common mistakes
Understand where ads.txt belongs, what the fields mean and how to avoid common publisher setup errors.
ads.txt is a public text file used in programmatic advertising to declare authorized sellers for a publisher's inventory. It is deliberately simple, but small placement or formatting mistakes can prevent systems from recognizing it.
Use the root location
For example.com, the expected location is https://example.com/ads.txt. A copy inside a subfolder does not represent the root domain.
Use platform-provided values
An entry normally contains the advertising-system domain, a publisher account ID, a relationship type such as DIRECT or RESELLER, and sometimes a certification authority ID. These values should come from the platform or an authorized partner.
Validate the public response
Open the URL in a private browser window. It should return readable text rather than a login page, redirect loop or HTML error document.
Keep it current
Remove sellers you no longer authorize and add new entries only when you understand the relationship.
Understand the four fields
A typical ads.txt line has four comma-separated fields. The first identifies the advertising system. The second is the seller or publisher account identifier. The third describes whether the relationship is DIRECT or RESELLER. The optional fourth field is a certification authority identifier. A publisher should copy these values from the platform rather than inferring them.
DIRECT does not mean “better”
DIRECT and RESELLER describe the business relationship. They are not quality scores. If a legitimate partner tells you to publish a RESELLER line, changing it to DIRECT simply because it sounds stronger would make the declaration inaccurate.
Watch the hostname
If the main site redirects between www.example.com and example.com, make sure the ads.txt location expected for the relevant domain remains reachable. Domain migrations deserve extra care because an old host can keep serving a stale file after the website itself has moved.
Troubleshoot in the right order
- Open the exact
/ads.txtURL. - Confirm the server returns the file rather than a branded 404 page.
- Search the text for the exact publisher ID.
- Check that commas and relationship values were not altered by a rich-text editor.
- If the file is correct but a platform has not recognized it yet, allow for crawler refresh and caching before making unnecessary changes.
Keep a minimal source of truth
Maintain one authoritative list of the sellers you intend to authorize. When a monetization partner is removed, review the file rather than allowing obsolete entries to accumulate indefinitely. A shorter accurate file is easier to audit than a large file assembled from copied examples.