Last reviewed
Ads txt validator for publishers.
This free ads txt validator checks your ads.txt or app-ads.txt file line by line against the IAB Tech Lab spec. Enter your domain to fetch the live file, or paste the text. You'll see every error and warning with the line number and how to fix it.
or paste the file
What we found
Ad systems in this file
| Ad system | Lines | DIRECT | RESELLER |
|---|
Next, make sure each DIRECT seller ID also appears in that ad system's sellers.json as a PUBLISHER, under your domain. Buyers compare both files.
Want us to check the whole setup?
Send us your site and we'll look at your ads.txt, sellers.json entries and demand partners together, then tell you what we'd fix first. The first review is free.
How it works
Enter a domain and our server fetches https://yourdomain/ads.txt once, the same way a buyer's crawler would, following up to three redirects. Your browser then checks every line against the IAB Tech Lab ads.txt spec. Pasted text never leaves your browser.
What an ads txt validator checks
An ads txt validator reads your file the way a buyer's crawler does and tells you which lines it can't use. If a line breaks the format, the crawler skips it. If the line it skips is the one for your main ad partner, buyers can treat your inventory as unauthorised and bid less, or not at all.
The file itself is simple. The IAB Tech Lab describes it as a public list of the companies allowed to sell your ad space. Small mistakes still slip in all the time, though. A missing comma, a pasted smart quote or a CDN rule that turns the file into a web page is enough. That's what this checker is for.
New to the file? Start with our ads.txt setup guide, then come back here to test what you made.
The ads.txt line format
Every seller line has three required fields and one optional field, split by commas. Anything after a # is a comment, and blank lines are fine.
| Field | What goes in it | Example |
|---|---|---|
| 1. Ad system domain | The bare domain of the platform that sells or resells your inventory | google.com |
| 2. Account ID | Your seller or publisher ID on that platform | pub-0000000000000000 |
| 3. Relationship | DIRECT if you control the account, RESELLER if a partner does | DIRECT |
| 4. Certification ID (optional) | The platform's ID with the Trustworthy Accountability Group | f08c47fec0942fa0 |
A full Google line looks like google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0. Google's own AdSense ads.txt guide gives you that line with your real ID filled in, so copy it rather than typing it.
Variables you can add
The spec also allows a few name=value lines. The validator checks that each one is spelled right and has a sensible value.
| Variable | What it says |
|---|---|
| CONTACT | How to reach whoever runs the file |
| SUBDOMAIN | A subdomain with its own ads.txt that crawlers should also read |
| OWNERDOMAIN | The business domain that owns this site. Use it once, and match the domain in your sellers.json entries |
| MANAGERDOMAIN | A company that manages your inventory, with an optional country code |
| INVENTORYPARTNERDOMAIN | A partner whose ads.txt also covers this inventory (mostly CTV) |
Errors and warnings, and how to fix them
The validator sorts what it finds into errors, warnings and notes. Fix the errors first, because those are the lines crawlers drop.
| Message | What it means | Fix |
|---|---|---|
| This is a web page | Your server returns HTML at /ads.txt, often a 404 page or the homepage | Upload a plain text file to the domain root and clear your cache |
| Needs at least 3 fields | A comma or a whole field is missing | Copy the line again from your partner |
| Has 5 or more fields | Two lines got joined, or a value has an extra comma | Put each seller on its own line |
| Must be DIRECT or RESELLER | A typo, or the fields are in the wrong order | Check the third field |
| Google publisher ID format | The ID isn't pub- plus 16 digits | Copy it from AdSense or Ad Manager |
| Duplicate line | The same seller appears twice | Delete the extra copy |
| Both DIRECT and RESELLER | One account is listed with two relationships | Ask the partner which one is right |
| Smart quotes or hidden characters | The file was edited in a word processor | Retype the line in a plain text editor |
| Not text/plain | The server sends the wrong content type | Ask your host to serve .txt files as text/plain |
Most broken files we see break in the first two rows. Security plugins, "coming soon" pages and some CDN settings quietly answer /ads.txt with HTML. The file looks fine on your computer, and buyers never see it.
ads.txt vs app-ads.txt
Both files use the same format. The difference is where they live. Websites put ads.txt on their own domain. Apps put app-ads.txt on the developer website listed in the app store, and buyers find it from there. Google's Ad Manager help on ads.txt and app-ads.txt covers both.
To test an app file, choose app-ads.txt in the menu and enter that developer domain. If your app ads aren't filling, our post on app-ads.txt setup errors lists the usual causes.
After the file passes: check sellers.json
A clean file is half the check buyers run. The other half is sellers.json, which each ad platform publishes to list who it pays. For a DIRECT line, your account ID should appear there as a PUBLISHER with your domain. If the two files disagree, buyers see a mismatch even when your ads.txt is perfect.
Our sellers.json guide shows how to find your own entry. The table of ad systems above gives you the list to check.
When to run the validator
- When you add or remove a partner. New lines are where typos come in.
- After a site move, redesign or CDN change. These are the changes that turn the file into a web page.
- When a platform shows an ads.txt warning. AdSense and Ad Manager both flag missing or unauthorised lines.
- About once a month anyway. Plugins and cache rules change without asking.
Platforms re-crawl on their own schedule, so a fix can take a few days to show in their dashboards. Don't keep editing while you wait. If the file is right and revenue is still down, we can look at the rest of your setup. See IVT protection or website monetization.
Validator questions
What does an ads txt validator check?
It reads every line of your ads.txt or app-ads.txt file and checks it against the IAB Tech Lab format: three or four comma-separated fields, a real ad system domain, an account ID, DIRECT or RESELLER, and well-formed variables. It also flags duplicates, hidden characters and files that come back as a web page.
Why can't the validator find my ads.txt file?
The file must sit at the root of your domain, like example.com/ads.txt, and answer with a 200 status. A 404, a login page, a block by your firewall or a redirect loop all stop crawlers from reading it.
Is a warning the same as an error?
No. An error means buyers' crawlers will probably skip that line. A warning means the line can still be read, but something looks wrong, such as a duplicate line or a Google line without its certification ID.
Does this tool check app-ads.txt too?
Yes. Pick app-ads.txt in the file menu and enter the developer website you list in the app store. The format is the same as ads.txt.
Will a valid file fix low revenue or unauthorized seller warnings?
It removes one common cause. Buyers also compare your file with each partner's sellers.json, so your seller ID needs to appear there too. If the lines are right and revenue is still low, the problem is usually demand or setup, not the file.
How often should I check my ads.txt file?
Check it every time you add or remove a partner, after any site migration or CDN change, and about once a month. Files often break quietly when a plugin, cache rule or theme update changes what the URL returns.
Is this ads txt validator free?
Yes, with no sign-up. Pasted text is checked in your browser. When you check a live domain, our server fetches the public file once and passes it back to your browser. Nothing is stored.