ads.txt: The One File an Ad Network Checks Before It Pays You

Date:

You finished the site, applied to an ad network, and nothing serves. Often the block isn’t your content or your traffic – it’s a missing text file at your domain root that the network uses to confirm the ad space is really yours to sell.

The short answer: ads.txt (Authorized Digital Sellers) is a plain-text file served at your domain root – https://yoursite.com/ads.txt – that lists which advertising systems are allowed to sell your ad inventory. Each line names an ad system’s domain, your publisher account ID on that system, and whether the relationship is DIRECT or RESELLER. Before a network serves or pays for ads, its crawler fetches that file and checks that your account is listed; if the file is missing, returns a 404, or still names a previous owner, the network treats your inventory as unauthorized and holds back. It is public by design, and it is one of the quickest launch checks to get right.
How ads.txt lets an ad network verify your inventoryOne plain-text file at the domain root, read by the network's crawler
1. File at the root

Served at /ads.txt, plain text, returns 200. Not in a subfolder.

2. Authorized line

system domain, your publisher id, DIRECT or RESELLER.

3. Network verifies

Crawler reads it, confirms it's your inventory, serves ads.

No file, a 404, or a previous owner's line = the network won't serve or pay. It is public by design.

What the file actually says

Each line is a short record with three required fields and an optional fourth:

  • The ad system’s domain – the canonical domain of the network or exchange, e.g. google.com.
  • Your publisher account ID – the identifier that system knows you by. This is not a secret; it is meant to be published, which is the whole point of the file.
  • The relationship – DIRECT if you have a direct account with that system, or RESELLER if a third party sells the inventory on your behalf.
  • A certification authority ID (optional) – a short code that further ties the record to the system.

A crawler reads those records literally. A typo in the domain, the wrong account ID, or the wrong relationship type is the same as not being listed at all: the record simply doesn’t match, and the matching ad requests go unfilled.

ads.txt is not a setting you toggle; it is a claim you publish. The network believes the file, so the file has to be exactly right.

Why a network insists on it

ads.txt exists to stop domain spoofing – bad actors reselling ad space they don’t own by claiming to represent a real site. By publishing the authorized-seller list at your own root, you let any buyer verify, independently, that a given seller is really allowed to sell your inventory. That protection only works if the file is present and correct, so networks enforce it: no valid record, no served ad. For a brand-new site this is a common invisible blocker – the application is fine, the content is fine, but the empty or absent ads.txt quietly fails the check.

Where it has to live

Two rules trip people up. First, location: the file must be at the domain root (/ads.txt), not in a subfolder and not behind a redirect chain – the crawler looks in exactly one place. Second, status: it must return HTTP 200 as plain text. A page-not-found that serves your themed 404 with a 200 status (a soft 404) can even make an absent file look like a broken one. On a subdomain, the root-domain file already covers it; a subdomain’s own file is read only when the root file points to it with a subdomain= line. A separate domain needs its own file. Confirm the raw file loads in a browser at the root before you assume it’s being read.

Request the file before you create it

Before you apply to an ad network, load https://example.com/ads.txt in a private window while the file still doesn’t exist. The answer you want is a plain 404. Anything else means a crawler will misread the absence.

On a WordPress test site with no file yet, that request came back as a 301 to a blog post about ads.txt. WordPress, finding no such page, looked for the post with the closest-looking slug and redirected to it. A crawler following that lands on an HTML article where it expects a plain-text list of sellers, so it sees a broken file rather than a missing one.

Turning that slug guessing off (the steps are in the soft 404 write-up) made /ads.txt answer a clean 404 until there was a real file to serve. Once the file sits in the web root, the web server hands it out before WordPress is even involved, so the redirect can no longer get in the way. If your own request returns anything other than a 404, find out why before you publish the file.

Getting it right at launch

Treat it as a launch gate, not an afterthought – it belongs in the same pre-flight pass as your go-live audit. The sequence is simple: get your publisher account ID from the network, create the ads.txt file with the exact record it gives you, place it at the domain root, load yoursite.com/ads.txt anonymously to confirm it returns the plain text, and only then expect serving to begin. If you bought the domain second-hand, delete any inherited records – a line naming the previous owner’s account is worse than an empty file. And remember the file is only one requirement among several: the network also wants real content and the usual policy pages, including a privacy policy and, for any affiliate links, an advertising or affiliate disclosure – see the legal dos and don’ts for what those pages should contain.

A second-hand domain often ships with someone else’s ads.txt, and an inherited seller line fails the check harder than no file at all.

The short version

ads.txt is a public, plain-text file at your domain root that names who is authorized to sell your ad inventory – the ad system’s domain, your publisher account ID, and a DIRECT or RESELLER relationship. Ad networks fetch it before serving and won’t monetize inventory whose file is missing, 404ing, or naming the wrong account, so it’s a frequent silent blocker on a new site. Put the file at /ads.txt, confirm it returns 200 as plain text when you load it anonymously, use the exact record the network gives you, clear out any records inherited with a second-hand domain, and treat it as a launch gate alongside your content and policy pages.

Frequently Asked Questions

Is it a problem that ads.txt is publicly visible?

No. Being public is the point. The publisher account ID in the file is an identifier meant to be published, not a secret, and public visibility is what lets any ad buyer check independently that a listed seller is really allowed to sell your inventory.

Does a subdomain or multisite site need its own ads.txt?

It depends. The file at your root domain also covers its subdomains. A subdomain needs its own file only when its sellers differ, and Google reads that file only if the root file points to it with a subdomain= line. A multisite network whose sites use separate domains needs a file on each domain. Load /ads.txt on every root domain that shows ads and confirm each one returns HTTP 200 as plain text.

I bought a used domain. Do I need to change ads.txt?

Yes. A second-hand domain often carries the previous owner’s ads.txt records, which name an account that isn’t yours. Those are wrong claims and will fail verification. Remove the inherited lines and publish only the records for your own accounts.

Share post:

Subscribe

Popular

More like this
Related

WooCommerce Search by SKU or ISBN Finds Nothing? It Never Looks There

A shopper types the SKU from your catalog, or the ISBN printed on the back of a book, and gets "No products were found". The product is right there, and the number is on its page. Search simply never reads that part of the product.

Computer Slow but CPU and Memory Look Normal? Check the Handle Count

Chrome takes a minute to open, or doesn't open at all. Every click waits. You open Task Manager expecting to find the culprit, and it tells you everything is fine. Here is the number that isn't, and the fix that takes two minutes.

Kernel-Power 41 Tells You Your PC Restarted, Not Why

Your PC restarts with no blue screen, and the only clue is a critical event saying it didn't shut down cleanly. Here is how to get from that event to a short list of suspects.

Set Up WordPress SMTP Without a Plugin, Even on a Multisite Network

WordPress mail goes out as wordpress@ your domain, from the web server, and lands in spam. An SMTP plugin fixes that. So do about twenty lines of code, and on a network of sites the code can give every site its own mailbox and its own password.