Skip to content

What is ads.txt?

ads.txt is a plain text file on a website that lists the companies allowed to sell that site's ad space. Buyers read it to make sure the seller offering an ad is really authorized by the publisher.

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, RESELLER

The pub ID above is made up. The four fields are:

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:

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

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.

Check it with ortb.in

Common questions

Is ads.txt required?

No law requires it, but many buyers favor or require authorized sellers, so a missing or wrong file can cost revenue.

Do I need one file per subdomain?

A subdomain can have its own file, which the main file points to with a SUBDOMAIN line. Otherwise the root file applies.

How often is the file read?

That depends on the buyer or crawler. Changes are usually picked up within days, not instantly.

Keep reading