Learn

← Track C: Supply-Chain Transparency
L1

C1

ads.txt and app-ads.txt

In this lesson you will
  • Read an ads.txt line: <SSP domain>, <publisher account ID>, <DIRECT|RESELLER>, [cert authority ID].
  • Explain its purpose and distinguish ads.txt (web) from app-ads.txt (apps).
  • Know the variables OWNERDOMAIN, MANAGERDOMAIN, SUBDOMAIN, and CONTACT.

Anyone can claim to sell ads for nytimes.com. A scammer can spin up a fake site, label its junk inventory as "nytimes.com," and pocket the premium. ads.txt is how the New York Times publicly says: no, only these specific companies are actually allowed to sell us.

ads.txt (Authorized Digital Sellers) is a plain text file a publisher hosts at the root of its domain, at /ads.txt. It lists exactly which SSPs and exchanges may sell that publisher’s inventory, and under which account. Its whole job is to kill that spoofing.

The line format

Every data line has the same shape: <SSP domain>, <publisher account ID>, <DIRECT|RESELLER>, [certification authority ID]. The fourth field is optional.

google.com, pub-1234567890123456, DIRECT, f08c47fec0942fa0
pubmatic.com, 156209, RESELLER
Two real-shaped ads.txt lines
  • SSP domain is the canonical domain of the system the publisher sells through, for example pubmatic.com.
  • Publisher account ID is the publisher’s account inside that SSP. It must reappear as a seller_id in the SSP’s sellers.json (the reciprocity check in the next lesson).
  • DIRECT or RESELLER states the relationship. DIRECT means the publisher has a direct contract with that SSP; RESELLER means the publisher authorized a third party to resell it.
  • Certification authority ID is the SSP’s ID in the TAG trust registry, an extra integrity anchor when present.

Key idea

A DIRECT line is a first-party relationship and the shortest possible path. A RESELLER line means an intermediary sits in the chain. A file dominated by RESELLER lines is a longer, less transparent supply chain, exactly what the Bidcliq Academy quality score penalizes.

Quick check

You see the line `pubmatic.com, 156209, RESELLER`. In plain English, what is it telling a buyer?

The variables

VariableMeaning
OWNERDOMAINThe entity that owns the site and its inventory. Added in v1.1 to assert true ownership.
MANAGERDOMAINThe entity that manages monetization (for example an outsourced ad-ops partner). Can be scoped to a region.
SUBDOMAINDeclares a subdomain that maintains its own ads.txt file.
CONTACTA contact address for questions about the file.

app-ads.txt

app-ads.txt is the same idea for mobile apps and CTV. Apps have no web root to crawl, so the app store listing declares the developer’s website, and the crawler fetches app-ads.txt from that domain’s root. Same line format, different inventory type.

Note

Malformed lines (wrong field count, an unrecognized type) are ignored by buyers. In a Bidcliq Academy audit they are surfaced rather than silently dropped, so a syntax error is visible instead of quietly costing the publisher authorization.

Key concepts
ads.txt record formatDIRECT vs RESELLERCertification authority ID (TAG-ID)OWNERDOMAIN / MANAGERDOMAIN / SUBDOMAIN / CONTACT variables
Going deeper

To really lock this in: parse 10 lines by hand and flag the malformed ones.

Where this leads
ANALYZE

Run a live audit and read the DIRECT/RESELLER split (directRatio) on a real publisher.

Open →
DEBUG

Feed a file with a syntax error and watch it land in ads.errors.

Open →
Bidcliq Academy · C1: ads.txt and app-ads.txt