Ads.txt Explained: What It Is and Why Publishers Need It

Ads.txt is a plain text file, published at the root of your website, that lists every company authorized to sell or resell your ad inventory. It is one of the simplest files in ad tech – and one of the most consequential. Buyers check it before bidding, most demand sources will not serve any impressions without being listed in your ads.txt file, and a single missing or malformed line can quietly cut off demand. In this guide, we explain what ads.txt is, how it works, what each field means (with a full example), and how related standards like sellers.json and app-ads.txt fit in.
What Is Ads.txt?
Ads.txt stands for Authorized Digital Sellers. It is a standard created by the IAB Tech Lab in 2017 to fight a specific type of ad fraud: domain spoofing. Before ads.txt, fraudsters could offer fake inventory on programmatic exchanges, claiming it belonged to a premium site – selling ad space “on nytimes.com” that never appeared anywhere near it. Buyers had no reliable way to check whether the seller actually represented the site.
Ads.txt solves this with radical simplicity. The publisher – the only party that controls what is hosted on their own domain – publishes a machine-readable list of authorized sellers at a predictable address: yourdomain.com/ads.txt. If a seller offers your inventory but is not on your list, buyers treat that inventory as unauthorized and skip it.
You can see a live example on almost any major website – for instance nytimes.com/ads.txt. Adoption is near-universal among monetized sites: the standard is now a baseline requirement of programmatic advertising rather than an optional extra.
How Ads.txt Works
The mechanism has three participants:
- Publishers declare their authorized sellers in the ads.txt file, one per line, including the account ID they hold with each seller.
- Buyers (DSPs) regularly crawl ads.txt files across the web and build a map of which seller-account pairs are authorized for which domains. Learn more about how buyers operate in our guide to demand-side platforms.
- At auction time, when a bid request arrives claiming to be from your domain via a given exchange and seller account, the buyer checks it against the map. Match: the buyer can bid with confidence. No match: the request is filtered as unauthorized.
This is why ads.txt errors cost money in both directions. A fraudster not on your list gets blocked – good. But a legitimate demand partner missing from your list gets blocked too, and the money their buyers would have spent on your inventory goes elsewhere.
Why Ads.txt Matters for Your Revenue
Ads.txt started as an anti-fraud measure, but for publishers today it is simply part of the revenue infrastructure:
- Buyers filter on it. Major DSPs refuse or devalue inventory that cannot be verified against ads.txt. No file – or a wrong one – means fewer bidders in every auction, which directly lowers your CPMs.
- In practice, it is mandatory. Google’s AdSense and Ad Manager flag missing or incorrect entries and stop serving ads on unverified inventory – and most other demand sources behave the same way.
- It protects your brand. Nobody can credibly sell fake inventory under your domain, so your legitimate inventory keeps its value.
- It gets more important as your stack grows. With header bidding and multiple ad networks in play, a single site can legitimately have dozens of entries – and every one of them needs to be right.
Ads.txt Syntax: What Each Field Means
Each data line in ads.txt contains three required fields and one optional field, separated by commas:
google.com, pub-1234567890123456, DIRECT, f08c47fec0942fa0
| Field | Example | Meaning |
|---|---|---|
| 1. Ad system domain | google.com | The canonical domain of the advertising system (SSP, exchange, or network) authorized to sell your inventory. |
| 2. Publisher account ID | pub-1234567890123456 | Your seller account ID within that system – it must match the ID in bid requests exactly. |
| 3. Relationship | DIRECT or RESELLER | DIRECT means you hold the account with this system yourself. RESELLER means you have authorized another party to sell through this system on your behalf. |
| 4. Certification authority ID (optional) | f08c47fec0942fa0 | An ID identifying the ad system within a certification authority (in practice, the TAG-ID). Google’s is f08c47fec0942fa0. The spec notes this field may eventually be superseded by sellers.json identifiers. |
Comments start with #, and blank lines are ignored. Where do the lines come from? You do not invent them – each demand partner tells you exactly which lines to add. Google publishes yours in AdSense and Ad Manager under the ads.txt settings, and monetization partners like Clickio provide a complete block covering every demand source they connect you to.
Ads.txt Example: A Complete Sample File
Here is what a realistic ads.txt file looks like for a publisher working with Google and a monetization partner:
# Ads.txt for example.com - last updated YYYY-MM-DD
CONTACT=adops@example.com
OWNERDOMAIN=example.com
MANAGERDOMAIN=clickio.com
# Google - direct account
google.com, pub-1234567890123456, DIRECT, f08c47fec0942fa0
# Monetization partner demand sources
rubiconproject.com, 12345, RESELLER, 0bfd66d529a55807
pubmatic.com, 156789, RESELLER, 5d62403b186f2ace
openx.com, 540123456, RESELLER, 6a698e2ec38604c6
appnexus.com, 3456, RESELLER, f5ab79cb980f11d1
indexexchange.com, 189012, RESELLER, 50b1c356f2c5c8fcThe IDs above are illustrative – always copy the exact lines your partners provide. Note the variable lines at the top. CONTACT has been part of the standard since 2017; OWNERDOMAIN and MANAGERDOMAIN were added in version 1.1 (2022):
CONTACT– an email address or URL buyers can use to reach whoever maintains the file.OWNERDOMAIN– declares the business domain of the site owner, so buyers can group multiple sites under one owner. Useful when your sites run on several domains.MANAGERDOMAIN– declares the business domain of a primary or exclusive monetization partner selling your inventory, and can be set per country (e.g.MANAGERDOMAIN=clickio.com, FR). It tells buyers who manages your ad sales – which pairs naturally with ads.txt delegation, where that same partner also hosts and maintains the file for you.
How to Add Ads.txt to Your Website
- Collect the entries. Ask each demand partner for their required lines. In Google AdSense or Google Ad Manager, the ads.txt section shows your exact line, including your publisher ID.
- Create a plain text file named
ads.txt– UTF-8, no formatting, one entry per line. - Upload it to the root of your domain so it is reachable at
https://yourdomain.com/ads.txt. The path must be exactly/ads.txton your root domain – crawlers only check subdomains if the root file points to them with theSUBDOMAINvariable. On WordPress, plugins (or your host’s file manager) can place it; many ad plugins also manage it for you. - Verify it loads by opening the URL in a browser, then run it through an ads.txt checker to catch syntax errors.
- Keep it current. Update the file whenever you add or remove a demand partner – and expect your partners’ own reseller lists to change over time.
The spec also allows your server to answer /ads.txt requests with a single HTTP redirect (301, 302, or 307) to a file hosted on another domain. That is how delegation works: your monetization partner hosts the file and keeps it current, and your server simply redirects to it. If maintaining the file manually across one or more sites sounds tedious – it is – see our full guide to ads.txt management and delegation.
Sellers.json: The Other Half of the Picture
Ads.txt lets buyers verify sellers from the publisher’s side. Sellers.json is the mirror-image standard on the ad system’s side: every SSP and ad exchange publishes a JSON file (e.g. Google’s sellers.json) listing all the sellers – publishers and intermediaries – it pays, with their seller IDs and whether each acts as a PUBLISHER, INTERMEDIARY, or both.
Together with the SupplyChain object (a field in the bid request listing every hop the inventory passed through), the two standards let a buyer trace the full path of an impression: your ads.txt confirms who may sell your inventory, and each system’s sellers.json confirms who they actually pay. Buyers increasingly use this to cut out murky resale paths – a practice known as supply path optimization. For publishers, the practical takeaway is simple: make sure your accounts are correctly represented on both sides, and keep your seller relationships transparent. Clean paths get more bids.
App-ads.txt: The Same Idea for Apps
App-ads.txt extends the standard to mobile and CTV apps. Since an app has no domain of its own, the file lives on the developer’s website – the one listed in the app store listing – at /app-ads.txt. The syntax is the same. One common pitfall: the developer URL in your store listing must match the domain hosting the file exactly, or crawlers will not find it. If you monetize apps or HTML5 games as well as websites, you need both files.
How to Validate Ads.txt (and the Mistakes to Avoid)
A broken ads.txt fails silently: nothing crashes, ads keep serving, and revenue just drifts lower. Validate the file whenever you change it, and re-check it periodically. Google flags ads.txt issues in AdSense and Ad Manager, and Clickio’s free Ads.txt Checker validates any domain’s ads.txt or app-ads.txt against the IAB specification, flagging errors and warnings with exact line numbers. Keep in mind that changes are not instant: crawlers re-check the file on their own schedule, so expect up to a day or more before a fix takes effect. Clickio’s platform includes ads.txt monitoring that continuously verifies your file and alerts you when entries are missing or the file becomes unreachable.
The most common (and most expensive) mistakes:
- Missing partner lines. You added a new demand partner but never updated the file – their entire demand is filtered out.
- Wrong publisher ID. A typo in the account ID is as bad as a missing line: the IDs in bid requests will not match.
- Syntax errors. Missing commas, stray spaces inside IDs, or entries pasted with formatting (curly quotes, invisible characters) from a document.
- File not reachable. A site migration, redirect misconfiguration, or CDN rule can make
/ads.txtreturn a 404 – after which crawlers eventually treat all your inventory as unverifiable. - Stale entries. Lines for partners you no longer work with. Beyond clutter, they represent standing authorizations that no longer reflect reality – prune them.
- Wrong relationship type. Marking a reseller as
DIRECT(or vice versa) misdeclares your supply chain and can get paths flagged during buyers’ supply path reviews.
Let Clickio Handle It
Clickio connects publishers to dozens of demand sources – Google AdX and the major SSPs among them – and takes ads.txt off your plate in the process. The platform generates the complete set of required entries, monitors your file continuously, and with Ads.txt Delegation can host and update the file automatically, so it stays correct as the demand landscape changes. Setup takes minutes.