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:
| Field | What it is | Example |
|---|---|---|
| 1. Ad system domain | The canonical domain of the ad system that runs the auction | google.com |
| 2. Publisher account ID | The seller's account/publisher ID in that ad system | pub-0000000000000000 |
| 3. Account type | DIRECT (direct relationship) or RESELLER (authorized third party) | RESELLER |
| 4. Certification authority ID | Optional 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, f08c47fec0942fa0How 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:
- The network gives you a line. It's a single, pre-formatted
RESELLERentry naming the network's Google publisher ID. - You add it to your ads.txt. Paste it verbatim at
/ads.txt, alongside any existing lines. Don't edit the ID or fields. - The network verifies it. It crawls your file to confirm the line is present and correct — which also confirms you own the site.
- 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.