Why it exists
Before ads.txt, anyone could claim to sell the ad space of a well-known website. Fake sellers listed inventory they did not own, and buyers had little way to tell. The IAB Tech Lab created ads.txt, short for Authorized Digital Sellers, so a publisher can state in public which companies may sell its ads. A buyer that sees a seller missing from the file can decline to bid.
Where the file lives
The file is served at the root of the site's domain, for example https://example.com/ads.txt. It must be plain text, not an HTML page. A site can point to separate files for its subdomains with a SUBDOMAIN line, covered below. Apps use the same format in an app-ads.txt file.
What a line looks like
Each line names one seller account at one ad system:
exchange.example, 10234, DIRECT, a1b2c3d4e5f60718
adnetwork.example, 5521, RESELLERThe pub ID above is made up. The four fields are:
- The ad system's domain: the exchange, network or SSP the publisher sells through.
- The seller account ID: the publisher's account number at that ad system.
- The relationship: DIRECT or RESELLER (see below).
- An optional certification authority ID, which identifies the ad system in the TAG registry.
DIRECT or RESELLER
DIRECT means the publisher owns the account and has a direct contract with that ad system. RESELLER means the publisher has authorized another company to sell its inventory through that ad system, so the account may belong to the reseller. A publisher can list the same ad system more than once, with different accounts and relationships.
Variables
Besides seller lines, the file can hold variables, one per line, written as NAME=value:
- CONTACT: how to reach the person responsible for the file.
- SUBDOMAIN: a subdomain that has its own ads.txt, for sites that split their inventory.
- INVENTORYPARTNERDOMAIN: another domain whose ads.txt also applies, used when content or inventory is shared.
- OWNERDOMAIN: the domain of the company that owns the site.
- MANAGERDOMAIN: the domain of the company that manages the site's advertising, when that is not the owner.
Lines that start with # are comments.
How buyers use it
Buying platforms collect ads.txt files and compare them with what they see in bid requests. If a request comes from a seller account the publisher has not listed, a buyer may skip it. A file also works the other way: an SSP or network can check which publishers have listed its accounts.
Common mistakes
- The file is not at the root of the domain, or sits only at www while the buyer asks for the bare domain.
- The address returns an HTML page (a soft 404) instead of text.
- A seller ID is mistyped, or does not exist at that ad system. The ad system's sellers.json can confirm it.
- A partner is listed as DIRECT when it is really a reseller, or the reverse.
- Old partners are never removed, so the file keeps accounts nobody uses.
- A redirect sends the request to a different domain than buyers expect.
How to check yours
Type your domain into the ads.txt & app-ads.txt Checker. It reads the file, groups the lines by ad system and, if you ask, checks every seller ID against that ad system's sellers.json. To see who else lists a seller ID, use Find Sites by Seller ID.