Skip to content

PubWeb

Tools

ads.txt validator

ads.txt validator: can Google read your file, and is every line right?

Type your domain and see whether Google’s ads crawler can read your ads.txt or app-ads.txt, from the status and redirects to robots.txt, then every line checked for format, DIRECT or RESELLER, variables and duplicates. Free, no sign-up.

Our server reads the address you type through our proxy network — the site sees the proxy, not you — and returns what it read for the checks. Answers are kept for up to 10 minutes and shown to anyone who checks the same address in that time. The publisher ID you type is not part of the read.

ads.txt validator

Our server reads the address you type through our proxy network — the site sees the proxy, not you — and returns what it read for the checks. Answers are kept for up to 10 minutes and shown to anyone who checks the same address in that time. The publisher ID you type is not part of the read.

How Google finds and reads an ads.txt file

An ads.txt file is a public list, at the root of a domain, of the ad systems and account IDs allowed to sell its inventory. Buyers and ad systems read it to avoid paying for counterfeit inventory, so a file Google cannot read, or a broken line, can cost bids.

Type a domain and our server reads /ads.txt at its root domain over https and http, the robots.txt of every host the answer passes through and, for ads.txt, the home page, whose ad code carries your Google publisher ID. The report says first whether anything stops Google’s ads crawler from reading the file, then checks every line against the IAB Tech Lab ads.txt 1.1 specification (2022) and the checks Google documents for Ad Manager and AdSense.

Press Example, then Check, to read the ads.txt of theguardian.com, a large news publisher, and see how each answer, redirect and line is reported.

How to use it

  1. Type your domain, like example.com. The file is read at the root domain, as Google does: www.example.com reads example.com/ads.txt.
  2. Pick the file type, ads.txt or app-ads.txt, and type your Google publisher ID if you like. Without one, the check uses the IDs in your home page’s ad code.
  3. Press Check. Example fills in a large news site, ready to check. What we read lists every file our server read, with its status and where a redirect ended.
  4. Read Can Google read it? first. Each reason comes with its fix: a 404 on either scheme, a web page served as the file, a wrong Content-Type, a redirect that leaves your domain twice, or a robots.txt rule that blocks Google’s crawler.
  5. Then fix the marked lines in the table and publish the clean copy as /ads.txt, served as text/plain. Press Check again to confirm; Google takes a day or more to read the change.

The four fields of a record

A record is one line of comma-separated fields: the domain of the ad system, your account ID there, DIRECT or RESELLER in any case, and an optional certification authority ID. The AdSense line Google gives is google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0, with your publisher ID in place of the zeros.

The fourth field is optional. The spec says sellers.json supersedes it and that it may be deprecated in a future version, and its own examples, d75815a79 and 5jyxf8k54, show it has no fixed length or alphabet (section 3.3).

Based on the IAB Tech Lab ads.txt 1.1 specification (CC BY 3.0).

Variables in ads.txt 1.1

A variable is a line of the form NAME=value, one per line. Version 1.1 knows five: CONTACT, SUBDOMAIN, INVENTORYPARTNERDOMAIN, and the two it added in 2022, OWNERDOMAIN and MANAGERDOMAIN. Names are read in any case.

Only the first OWNERDOMAIN counts. MANAGERDOMAIN takes a domain and an optional two-letter country code: one entry per country and one default without a country, because consumers will likely ignore conflicting entries, as the IAB’s implementation guidance notes. SUBDOMAIN is ignored in an app-ads.txt file.

Mistakes this validator finds

First, whether the file answers: a 404 on https or http, a web page served as the file, a server error or a refused request, a redirect chain that leaves your root domain and goes on, a Content-Type other than text/plain, text that is not UTF-8, and a robots.txt rule that blocks Google-adstxt, Mediapartners-Google or Googlebot on any host of the chain.

Then the lines: duplicate records, one account listed as both DIRECT and RESELLER, a URL or a path in field 1, spaces or commas inside a field, values split by tabs or spaces instead of commas, invisible characters copied from a document, a Google ID under a domain other than google.com, and an empty file where the placeholder record belongs. Each one comes with its line and its fix.

robots.txt matters here because Google’s AdSense help says a rule there can keep its crawler from reading ads.txt: check the whole file, and the sitemaps it lists, with the robots.txt and sitemap checker.

Where the file lives, and what a clean result proves

Publish the file as /ads.txt at the root domain, served as text/plain with a 200 status, on https and http, or with http redirecting to https. Redirects may stay inside your root domain for any number of hops, with one hop to another domain allowed and nothing after it. Google reads the file about every 24 hours; Ad Manager allows up to 48 hours for a change, and AdSense a few days, up to a month on a low-traffic site.

A clean check proves that our reader got the file and that its format is right. Buyers check each account ID against the ad system’s sellers.json, which this tool does not read, and a bot-protection page that refused our reader says nothing about Google.

Once the file is fixed, watch what the pages earn with the eCPM and page RPM calculator.

Questions

What is ads.txt?

A public text file at the root of your domain that lists the ad systems and account IDs allowed to sell your inventory. Buyers read it to avoid paying for counterfeit inventory.

How does this tool read my file?

Our server asks for /ads.txt, or /app-ads.txt, at your root domain over https and http, then the robots.txt of each host on the way and, for ads.txt, your home page, through our proxy network and with a normal browser’s headers. It never claims to be Google’s crawler. Answers are kept for up to 10 minutes and shown to anyone who checks the same site in that time; the publisher ID you type is not part of the read.

What if the site’s bot protection refuses your reader?

Some CDNs and firewalls challenge visitors they do not know. When one refuses our reader we cannot see the file, and the report says it could not confirm. That says nothing about Google, which such protection usually lets through; to be sure, check your CDN or firewall logs for refused Google requests on /ads.txt.

What is the difference between DIRECT and RESELLER?

DIRECT means you control the account on that ad system, usually through a direct contract. RESELLER means you authorised another company to control the account and resell your inventory through that system.

Is the certification authority ID required?

No, the fourth field is optional. It holds an ID from a certification authority such as TAG. The IAB spec says the field may be deprecated and that sellers.json supersedes it. The AdSense line Google gives includes one.

What are OWNERDOMAIN and MANAGERDOMAIN?

Two variables added in ads.txt 1.1. OWNERDOMAIN names the business that owns the site, and the spec recommends it in every file. MANAGERDOMAIN names a primary or exclusive monetization partner that sells your inventory, everywhere or in one country, and is used only when you do not manage that selling yourself.

Does a clean result confirm my seller IDs are real?

No. The check covers whether the file can be read and its format. Whether an account ID exists at an ad system is something buyers check in that system’s sellers.json, which this tool does not read.

How long until Google sees my fix?

Google tries to read ads.txt about every 24 hours. Ad Manager allows up to 48 hours for a new or changed file, and AdSense a few days, up to a month on a site with few ad requests; in AdSense, Sites › your site › Check for updates asks for a new read.

All free tools

PubWeb

Fixed the file? Watch what the pages earn.

PubWeb’s analytics shows revenue per session and per visitor by site and traffic source, and it prices your Ad Manager blocks with one floor per block, country group and device.