ads.txt Generator & Validator
Build a valid ads.txt file row by row — add ad system domains, publisher account IDs, and DIRECT/RESELLER relationships — or paste an existing file and validate every line for format and relationship errors. Includes one-click presets for Google AdSense and Google Ad Manager. The generator enforces the IAB ads.txt spec: four comma-separated fields with optional certification authority ID.
How to use the ads.txt Generator & Validator
Switch between Build and Validate mode with the dropdown.
Build mode: Click + Google AdSense or + Google Ad Manager to prefill the standard IAB-certified Google rows. Click + Add row to add other ad partners — enter the ad system domain (e.g., openx.com), your publisher account ID from that network, the relationship type (DIRECT means you have a direct contract; RESELLER means you sell through an intermediary), and the optional certification authority ID (TAG-ID from the IAB Tech Lab registry). Click Generate and then Download ads.txt — upload the file to https://yourdomain.com/ads.txt (root only; subdirectory paths are ignored).
Validate mode: Paste your existing ads.txt content and click Validate. The tool checks each non-blank, non-comment line for the correct number of fields and verifies the relationship is DIRECT or RESELLER. Errors are reported per line.
What ads.txt is and why it matters
ads.txt — Authorized Digital Sellers — is a simple text file that publishers place at the root of their domain to declare which ad systems are authorized to sell their inventory. Introduced by the IAB Tech Lab in 2017, it is now a requirement for most programmatic buyers: demand-side platforms (DSPs) and advertisers check the ads.txt file before bidding. Missing or incorrect entries cause lost impressions and revenue.
Each line in the file contains up to four comma-separated fields: ad system domain (the ad network or SSP's canonical domain, e.g., google.com); publisher account ID (your account identifier at that system, e.g., pub-1234567890123456); relationship (DIRECT if you have a direct contract with that system, RESELLER if an intermediary sells your inventory); and the optional certification authority ID (TAG-ID from the IAB Tech Lab Certified Against Fraud registry, e.g., f08c47fec0942fa0 for Google). Lines starting with # are comments; blank lines are ignored.
Common pitfalls: the file must be served at exactly https://yourdomain.com/ads.txt — subdomains or subdirectories do not count. Case sensitivity: relationship must be uppercase DIRECT or RESELLER. Account IDs must exactly match what the ad system assigned — a single transposed character causes the entry to be invalid.
Common use cases
- AdSense monetization — Google requires a valid ads.txt with the correct pub-ID entry before serving ads. Missing or wrong entries result in a "Monetization alert" and reduced fill rate.
- Programmatic header bidding — Publishers using Prebid.js or a header-bidding wrapper list every SSP partner. DSPs filter out bid requests from publishers whose ads.txt doesn't include the relevant partner.
- Ad fraud prevention — Buyers use ads.txt to verify they are bidding on legitimate inventory — not counterfeit impressions from domain spoofers. A correct file protects your reputation and CPM rates.
- Auditing an inherited site — Use Validate mode to quickly scan an acquired site's ads.txt for format errors, deprecated entries, or unauthorized resellers.
- Multi-network publishers — Sites running AdSense, Ad Manager, and multiple SSPs need one file listing all partners — this tool builds it row by row without manual format errors.
Frequently asked questions
Does ads.txt need to be at the root of my domain?
https://yourdomain.com/ads.txt exactly. Subdomain paths (www.yourdomain.com/ads.txt vs yourdomain.com/ads.txt) are technically separate files — buyers check both, but host it at the apex domain to be safe.What is the certification authority ID, and is it required?
f08c47fec0942fa0. It's optional in the spec, but DSPs prefer entries with TAG-IDs and may filter out entries without them.