ads.txt Explained: What It Does and How to Set It Up
The ads.txt file is a small text file that helps advertising platforms identify which companies are authorized to sell or resell ad inventory for a website. It was introduced by the IAB Tech Lab as a transparency measure for digital advertising.
Where the file belongs
The file normally lives at the root of the domain. For a site called example.com, the public location is https://example.com/ads.txt. It should be reachable as plain text without requiring a login.
What an entry looks like
A line may look like this:
example-ad-platform.com, publisher-id, DIRECT, certification-id
The exact values come from the advertising platform. Do not invent publisher IDs or certification values.
DIRECT versus RESELLER
DIRECT generally means the publisher has a direct business relationship with the advertising system listed in the line. RESELLER means another authorized seller is involved. Use the relationship type provided by the platform or partner.
Common setup mistakes
- Uploading the file to a subfolder instead of the domain root.
- Using the wrong publisher ID.
- Serving an HTML error page instead of plain text.
- Blocking crawlers from accessing the file.
- Copying entries from another website without understanding them.
When changes appear
Advertising systems crawl the file periodically, so updates are not always reflected immediately. After changing the file, verify the public URL yourself and then allow time for the advertising platform to refresh its status.