What ads.txt is for
ads.txt (Authorized Digital Sellers) is a plain text file at the root of your domain that lists the companies allowed to sell your ad inventory. Advertisers and ad platforms read it to avoid buying fraudulent or spoofed inventory. If you use Google AdSense and the file is missing or wrong, AdSense shows an ads.txt warning and your earnings can be affected.
What the validator checks
- That the file exists, returns HTTP 200 and is served as plain text rather than an HTML page.
- Each record has the format domain, account ID, DIRECT or RESELLER, and an optional certification authority ID.
- Variables such as contact, ownerdomain and subdomain are well formed.
- Duplicate lines, lowercase relationship values and a malformed Google publisher ID.
- Whether Google lines carry the standard certification ID f08c47fec0942fa0.
- Redirects to another domain, which crawlers only follow within the same root domain.
Using the generator
Enter your AdSense publisher ID (pub- followed by sixteen digits) and the tool writes the standard Google line for you. You can paste in lines supplied by other ad networks, then copy the result or download it as ads.txt. Upload the file to the root of your site so it is reachable at yourdomain.com/ads.txt, and wait for AdSense to re-crawl it, which can take some time.
Limits
The validator checks syntax and common mistakes. It cannot confirm that a publisher ID belongs to you or that an ad network has authorised your account, so verify those details in the network's own dashboard. It also does not read a sellers.json file.
Why ads.txt exists
An ads.txt file lists the companies authorised to sell your ad space. It helps advertisers avoid fraud and protects publishers from impersonation. Ad networks such as Google AdSense recommend it, and missing or wrong entries can reduce ad demand.
What each line means
Every line has the ad system domain, your publisher ID, the relationship type (DIRECT or RESELLER) and an optional certification authority ID. The file must sit at the root of your domain, for example example.com/ads.txt, and be plain text.
Common mistakes
Typing the wrong publisher ID, adding extra spaces or saving the file with the wrong name or encoding are the usual problems. Validate after every change, copy the lines exactly as your ad partners provide them and allow time for crawlers to pick up updates.
What a valid ads.txt line looks like
Each line has the ad system domain, your publisher ID, the relationship (DIRECT or RESELLER) and optionally a certification authority ID, for example google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0. Lines starting with a hash are comments. The file must sit at the root of the domain, such as example.com/ads.txt, and return plain text with a 200 status.
Common errors the validator catches
Typical problems include extra spaces, missing relationship words, duplicate lines, wrong casing of DIRECT or RESELLER, and an ads.txt placed in a subfolder. Fixing these helps ad platforms trust your inventory and protects revenue from unauthorised sellers.