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) or RESELLER (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 like CONTACT= or OWNERDOMAIN= 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

Ad delivery won't stop immediately, but Google flags sites that lack a correctly configured ads.txt, and leaving it unaddressed can lead to part of your ad inventory no longer being sold. Check the ads.txt snippet for your site in the AdSense dashboard and host it at your domain root.

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.

It's the account-specific ID issued by each ad system (Google AdSense, Google Ad Manager, other SSPs, etc.). For AdSense it is a string starting with "pub-", which you can find on the account settings page or via the ads.txt snippet feature in the dashboard.

It varies by ad system and crawler, but it is commonly refetched within 24 hours. Since it can take a while for changes to propagate, don't worry if your ad delivery doesn't change immediately after an update.

In principle, ads.txt is independent per domain, and a subdomain does not inherit the settings from the root domain. However, the IAB spec includes a 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.

→ Browse all trivia