ads.txt Validator
Paste your ads.txt content to check its syntax instantly. Validates the DOMAIN, PUBLISHER_ID, and RELATIONSHIP (DIRECT/RESELLER) fields line by line, helping you correctly set up the file that guards against unauthorized ad inventory reselling (domain spoofing).
Tips
- The basic format has 3 fields — DOMAIN, PUBLISHER_ID, and RELATIONSHIP — with an optional 4th field for the certification authority ID. Count the commas to check nothing is missing or extra.
- RELATIONSHIP only accepts
DIRECT(the site owner has a direct contract) orRESELLER(sold through a reseller). It is case-insensitive per spec, but uppercase is the conventional style. - Lines starting with
#are ignored as comments. Adding variable directives likeCONTACT=orOWNERDOMAIN=helps ad systems cross-check your account. - ads.txt must be hosted at the domain root (
https://example.com/ads.txt). Placing it in a subdirectory means ad systems and crawlers won't recognize it. - There is a companion spec for mobile apps called
app-ads.txt. If you sell ad inventory on both a website and a mobile app, you need to host both files.
Frequently Asked Questions
DIRECT means the site owner has a direct contract with the ad system and holds the authority to sell that inventory. RESELLER is used when a reseller (such as an ad network) sells the inventory on the owner's behalf, with delegated authority. If a single ad slot is sold through multiple ad systems, each relationship must be listed correctly.SUBDOMAIN= directive that lets you point specific subdomains to a separate file.
Side Note — Why ads.txt exists: an industry standard against ad inventory "spoofing"
ads.txt (Authorized Digital Sellers) is a specification created in 2017 by the IAB Tech Lab. At the time, programmatic advertising was plagued by "domain spoofing" — fraudsters copying and reselling legitimate publishers' ad inventory without authorization. Advertisers thought they were bidding on a premium site, but their ads ended up on unrelated, low-quality pages instead, eroding trust for both advertisers and publishers.
The mechanism is simple: a publisher lists, at the root of its domain, the advertising systems it has authorized to sell its inventory, as a plain text file. Ad buying systems fetch this file and verify whether the inventory they are bidding on is really being sold through a channel the domain has officially approved. Because the design is so simple, adoption cost is low, and within a few years the majority of major ad systems and publishers had embraced it as an industry standard.
Google AdSense has also promoted ads.txt adoption since 2019, and sites without it correctly configured may see part of their ad delivery restricted. For a site whose business model runs on ad revenue, ads.txt is not just a recommendation — it is effectively a required setting to protect that revenue.
Companion specs from the IAB Tech Lab include app-ads.txt for mobile apps and sellers.json, which publishes information about sellers on the ad-system side. Together, they let advertisers verify who is selling which inventory and under what relationship across the entire supply chain.