Skip to main content
Guide

ads.txt for publishers: what it is and how to set it up

ads.txt — short for Authorized Digital Sellers — is a plain-text file you place at the root of your domain that publicly lists which ad systems and accounts are allowed to sell your inventory. It exists to stop unauthorized resale and counterfeit impressions, and it's now effectively required to monetize. This guide covers why it exists, the line format, how it works when you join a managed network, common mistakes, and how to verify it.

What ads.txt is

ads.txt is an IAB Tech Lab standard: a simple text file hosted at https://yoursite.com/ads.txt that names every advertising system authorized to sell your ad inventory, and the account ID under which they're allowed to sell it. Buyers' systems crawl this file before bidding. If an impression claims to come from your site but is being offered by an account your ads.txt doesn't list, buyers treat it as unauthorized and can decline to bid. In effect, ads.txt is a public allow-list for who may sell you.

Why it exists

ads.txt exists to fight unauthorized inventory resale and the fraud that rides on it. Before the standard, bad actors could spoof premium domains — claiming impressions were from a well-known site when they weren't — and resell that fake inventory through murky chains, siphoning ad spend and undermining trust in programmatic. By letting publishers declare their authorized sellers in a machine-readable file, ads.txt makes domain spoofing and unauthorized reselling far easier to detect. It also helps reduce a slice of invalid traffic (IVT) by cutting off counterfeit supply. The result is a cleaner marketplace where your legitimate impressions command more confident bids.

The line format, field by field

Each authorized seller is one line with up to four comma-separated fields. The format is:

<ad system domain>, <publisher account ID>, <DIRECT|RESELLER>, <certification authority ID>

Here are the fields in detail:

FieldWhat it isExample
1. Ad system domainThe canonical domain of the ad system that runs the auctiongoogle.com
2. Publisher account IDThe seller's account/publisher ID in that ad systempub-0000000000000000
3. Account typeDIRECT (direct relationship) or RESELLER (authorized third party)RESELLER
4. Certification authority IDOptional ID for the ad system from a certification authority (e.g. TAG)f08c47fec0942fa0

DIRECT vs RESELLER

The third field is the one publishers most often get wrong, so it's worth being precise. DIRECT declares that you have a direct account relationship with the ad system named — you own that account. RESELLER declares that an authorized third party sells your inventory on your behalf through their account. When you monetize through a managed Google Ad Manager network, the network sells your inventory under its own Google publisher ID, so the correct line is a RESELLER entry naming that ID. A typical Google reseller line looks like:

google.com, pub-0000000000000000, RESELLER, f08c47fec0942fa0

How ads.txt works when you join a managed network

When you join a managed network, ads.txt is how you grant that network permission to sell your inventory — and it doubles as proof you control the domain. The flow is short:

  1. The network gives you a line. It's a single, pre-formatted RESELLER entry naming the network's Google publisher ID.
  2. You add it to your ads.txt. Paste it verbatim at /ads.txt, alongside any existing lines. Don't edit the ID or fields.
  3. The network verifies it. It crawls your file to confirm the line is present and correct — which also confirms you own the site.
  4. Buyers trust your inventory. Because the authorization is now public, Google and buyers accept impressions sold through the network.

With pubads.io this is literally the only code you touch to get verified. Adding one ads.txt line is how we confirm domain ownership — no DNS changes, no custom subdomain. See how it works for the full onboarding flow, and our MCM guide for what that line authorizes.

Common ads.txt mistakes

Most ads.txt problems come down to a handful of avoidable errors. Each one can quietly suppress your revenue, so check for all of them:

  • Wrong location. The file must be at the root (/ads.txt), served over your apex domain — not in a subfolder, and reachable without a redirect chain.
  • Typos in the publisher ID. A single wrong character means the authorization doesn't match, and buyers treat the inventory as unauthorized.
  • Wrong account type. Marking a reseller line as DIRECT (or vice versa) breaks validation. Use exactly what your network specifies.
  • Blocked or non-plain-text file. If a redirect, robots rule, or HTML wrapper stops crawlers from reading raw text, the file is effectively invisible.
  • Stale entries. Forgetting to remove old networks' lines after you leave them — or to add a new one — leaves your authorizations out of date.

How to verify ads.txt

Verifying ads.txt takes two minutes. First, open https://yoursite.com/ads.txt directly in a browser and confirm it loads as raw plain text with your lines visible — no login, no redirect, no HTML page. Second, run it through an ads.txt validator or your ad platform's crawler-status report to catch formatting issues and confirm the authorization was picked up. When you onboard with pubads.io, we check the authorization line for you as part of verification, so you'll know immediately if anything is off.

Frequently asked questions

ads.txt (Authorized Digital Sellers) is a plain-text file that publishers place at the root of their domain to publicly list which advertising systems and accounts are authorized to sell their inventory. It's an IAB Tech Lab standard designed to stop unauthorized resale of ad inventory and counterfeit impressions.

It must live at the root of your domain, at /ads.txt — for example, https://yoursite.com/ads.txt. It has to be served over your root domain (not a subfolder or subdomain) so crawlers can find it at the standard location. Each authorized seller is one line in the file.

DIRECT means you have a direct account relationship with that ad system selling your inventory. RESELLER means an authorized third party (such as a managed network) sells your inventory on your behalf through their account. When you join a managed Google Ad Manager network, you typically add a RESELLER line for Google naming the network's publisher ID.

The fourth field is the certification authority ID — a unique identifier for the ad system issued by an industry certification authority such as TAG. For Google, this value is f08c47fec0942fa0. It's optional in the spec but should be included when the ad system has one, because some buyers require it.

Yes. If your ads.txt is missing, malformed, or doesn't authorize the account selling your inventory, buyers may refuse to bid on your impressions, directly reducing fill and revenue. Common mistakes include placing the file in the wrong location, typos in the publisher ID, blocking the file with robots or a redirect, and forgetting to keep it updated when you change networks.

Open https://yoursite.com/ads.txt in a browser to confirm it loads as plain text with your lines visible. Then check it with an ads.txt validator or your ad platform's crawler status. When you join pubads.io, we confirm the authorization line is present and correctly formatted as part of verifying you own the site.

One ads.txt line is all it takes

Create an account, add your site, and verify it with a single ads.txt line. We get you approved on Google Ad Manager and Google serves the ads.