Skip to content
adstxtPublic

About

Everything about ads.txt, app-ads.txt, sellers.json and schain: docs, examples, server configs and validation.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

ads.txt

The practical, open reference for ads.txt, app-ads.txt, sellers.json and the SupplyChain object.
Plain-language docs, copy-ready examples, server configs, validation checklists and the best references in one place.

License: MIT Spec: ads.txt 1.1 Covers app-ads.txt, sellers.json, schain PRs welcome

Format · Quick start · Examples · Validate · References · Contribute · Sponsor

⭐ Star this repo if it helps  ·  🐞 Found a problem?  ·  💖 Sponsor the project


Table of contents


What is ads.txt?

ads.txt (Authorized Digital Sellers) is an IAB Tech Lab standard, released in 2017, that lets a website publicly declare which companies are allowed to sell its ad inventory.

It's a plain-text file at the root of the domain:

https://example.com/ads.txt

Because only the real owner of a domain can publish a file on it, buyers can trust the list, and anyone selling the site's inventory who is not on the list is treated as unauthorized.

Why it matters

Without ads.txt With ads.txt
Fraudsters can claim their traffic comes from your premium site (domain spoofing) Buyers reject sellers you didn't authorize
Unauthorized companies resell your inventory Only listed accounts can sell it
Buyers can't verify supply, so they bid less or not at all Buyers bid with confidence
Many SSPs and DSPs refuse to transact Full access to programmatic demand

For publishers, a missing or broken ads.txt usually means lost revenue: Google AdSense and Ad Manager warn about it, and most major buyers filter out unauthorized supply.

How it works

 1. Publisher                 2. Seller (SSP / exchange)        3. Buyer (DSP)
 ────────────                 ──────────────────────────        ─────────────
 Publishes                    Sends a bid request:              Crawls example.com/ads.txt
 example.com/ads.txt:           site   = example.com            and checks the request:
                                seller = ssp.example / 12345
 ssp.example, 12345, DIRECT                                     "ssp.example, 12345" listed?
                                                                  ✔ yes → bid
                                                                  ✘ no  → skip

Buyers then go further with sellers.json (who owns account 12345?) and the SupplyChain object (every company that touched the impression). See the standards family.

Anatomy of an ads.txt line

google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0  # optional comment
└────┬───┘  └────────┬────────┘  └──┬──┘  └───────┬──────┘
     │               │              │             └─ 4. Certification authority ID (optional, usually TAG ID)
     │               │              └─────────────── 3. Relationship: DIRECT or RESELLER
     │               └────────────────────────────── 2. Your account ID in that ad system
     └────────────────────────────────────────────── 1. Domain of the ad system
Field Required Notes
1. Ad system domain Yes Bare domain such as google.com, pubmatic.com. No https://, no www., no path.
2. Account ID Yes Copy it exactly from your partner. Must match their sellers.json seller_id.
3. Relationship Yes DIRECT: you control the account. RESELLER: someone you authorized controls it.
4. Certification ID No Identifies the ad system (not you), e.g. Google is always f08c47fec0942fa0.

Full details: docs/ads-txt-spec.md.

Variables

Variable Purpose Example
OWNERDOMAIN Business domain of the site owner (ads.txt 1.1) OWNERDOMAIN=example.com
MANAGERDOMAIN Business domain of the company that sells the inventory, optionally per country (ads.txt 1.1) MANAGERDOMAIN=saleshouse.example, CA
CONTACT Who to contact about the file CONTACT=adops@example.com
SUBDOMAIN A subdomain with its own ads.txt (root file only) SUBDOMAIN=news.example.com
INVENTORYPARTNERDOMAIN A partner who shares your inventory (common in CTV) INVENTORYPARTNERDOMAIN=partner.example

No programmatic sellers at all? Publish the spec's placeholder record so spoofers can't use your domain:

placeholder.example.com, placeholder, DIRECT, placeholder

Quick start

Website publisher (ads.txt)
  1. Collect the exact ads.txt lines from every partner that sells your inventory (AdSense, Ad Manager, header bidding SSPs, ad networks, sales houses).

  2. Create a plain-text UTF-8 file named ads.txt:

    OWNERDOMAIN=example.com
    CONTACT=adops@example.com
    
    # Google
    google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
    
    # Header bidding
    pubmatic.com, 100001, DIRECT, 5d62403b186f2ace
    rubiconproject.com, 10001, RESELLER, 0bfd66d529a55807
    
  3. Upload it to the domain root: https://example.com/ads.txt.

  4. Check it returns 200, text/plain, and no HTML, on both example.com and www.example.com.

  5. Update it whenever you add or drop a partner.

Guide: docs/implementation-guide.md · Server configs: examples/server-config/

App developer (app-ads.txt)
  1. Set the developer website in every app store listing (Google Play, App Store, Amazon, Roku, etc.).
  2. Collect lines from every ad network and mediation partner (AdMob, AppLovin, Unity, Meta, InMobi, etc.).
  3. Publish them at https://<developer website root>/app-ads.txt.
  4. Check status in your ad network dashboards after they recrawl.

Guide: docs/app-ads-txt.md

SSP, exchange or ad network (sellers.json + schain)
  1. Publish https://<your domain>/sellers.json listing every seller account with seller_type, name and domain.
  2. Send a complete, accurate SupplyChain object (source.schain) in every bid request.
  3. Give publishers exact ads.txt lines, including your certification ID.

Guides: docs/sellers-json.md · docs/supply-chain-object.md

Buyer or DSP
  1. Crawl ads.txt / app-ads.txt for every domain and app you see.
  2. Match each bid request's seller (and every schain node) against those files and against sellers.json.
  3. Prefer DIRECT, complete, short supply paths.

Guide: docs/crawling-and-buyers.md

The standards family

Standard Published by Location Answers
ads.txt Website publisher https://<domain>/ads.txt Who may sell my web inventory?
app-ads.txt App developer https://<developer site>/app-ads.txt Who may sell my app inventory?
sellers.json SSP / exchange / network https://<ad system domain>/sellers.json Who is behind each seller account?
SupplyChain (schain) Every seller in the path Inside the OpenRTB bid request Which companies touched this impression?
buyers.json / DemandChain Buying platforms https://<domain>/buyers.json Who is behind each buyer seat?

Together they let a buyer verify an impression end to end:

ads.txt         → the publisher authorized seller 12345 on ssp.example
sellers.json    → seller 12345 on ssp.example is "Example Media Inc." (example.com)
OWNERDOMAIN     → example.com owns the site                            ✔ consistent
schain          → ssp.example/12345 → exchange.example/98765, complete ✔ every hop authorized

Timeline

Year Milestone
2017 ads.txt 1.0 released
2019 app-ads.txt, sellers.json and the SupplyChain object released
2019–2021 SUBDOMAIN, INVENTORYPARTNERDOMAIN and the "no authorized sellers" placeholder conventions added
2022 ads.txt 1.1 adds OWNERDOMAIN and MANAGERDOMAIN

Documentation

Topic Document
What ads.txt is and why it exists docs/overview.md
Full file format: fields, variables, comments, rules docs/ads-txt-spec.md
app-ads.txt for mobile and CTV apps docs/app-ads-txt.md
sellers.json for ad systems docs/sellers-json.md
SupplyChain object (schain) in OpenRTB docs/supply-chain-object.md
Step-by-step publisher setup docs/implementation-guide.md
How buyers and crawlers read the file docs/crawling-and-buyers.md
Validation checklist and common errors docs/validation-and-common-errors.md
Ad system domains and certification (TAG) IDs docs/ad-systems-and-certification-ids.md
Frequently asked questions docs/faq.md
Glossary docs/glossary.md
Specs, guides, tools and live example files docs/references.md

Examples

Scenario File
Minimal ads.txt examples/ads.txt/minimal.txt
Full publisher file with all variables examples/ads.txt/publisher-full.txt
Small blog using only AdSense examples/ads.txt/adsense-blog.txt
Publisher managed by a sales house (MANAGERDOMAIN) examples/ads.txt/managed-publisher.txt
Root domain declaring subdomains (SUBDOMAIN) examples/ads.txt/root-with-subdomains.txt
CTV with an inventory partner (INVENTORYPARTNERDOMAIN) examples/ads.txt/ctv-inventorypartnerdomain.txt
Domain with no authorized sellers examples/ads.txt/no-authorized-sellers.txt
12 common mistakes, each with the fix examples/ads.txt/common-mistakes.txt
app-ads.txt for an app developer examples/app-ads.txt/app-ads.txt
sellers.json for an SSP examples/sellers.json/sellers.json
Bid request with a SupplyChain object examples/schain/bid-request-schain.json

Server configs: nginx · Apache · IIS · Express · Next.js · WordPress · Cloudflare

Validate from the command line

D=example.com

# Status code, content type and redirect chain (want 200 + text/plain)
curl -sIL "https://$D/ads.txt"

# Print the file
curl -sL "https://$D/ads.txt"

# Show only seller records (no comments, blanks or variables)
curl -sL "https://$D/ads.txt" | tr -d '\r' | sed 's/#.*//' | grep ','

# Find duplicate records
curl -sL "https://$D/ads.txt" | tr -d '\r' | sed 's/#.*//' | tr 'A-Z' 'a-z' | tr -d ' \t' | grep , | sort | uniq -d

# Count records per ad system
curl -sL "https://$D/ads.txt" | tr -d '\r' | sed 's/#.*//' | grep , | cut -d, -f1 | tr -d ' ' | tr 'A-Z' 'a-z' | sort | uniq -c | sort -rn

More checks: docs/validation-and-common-errors.md

Common mistakes

Wrong Right
https://www.google.com/, pub-0000000000000000, DIRECT google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
google.com, ca-pub-0000000000000000, DIRECT google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
pubmatic.com 100001 DIRECT pubmatic.com, 100001, DIRECT, 5d62403b186f2ace
File at /ads/ads.txt File at /ads.txt (domain root)
Server returns an HTML page Serve the static file with Content-Type: text/plain
Works on www. only Works on both hosts, or one redirects to the other
Bot protection blocks crawlers Allow /ads.txt for every user agent
Partner's RESELLER line changed to DIRECT Copy partner lines exactly

Top references

Official

Platform guides

Real-world files worth studying

Tools

Full list: docs/references.md

Repository structure

.
├── .github/                 Issue templates for corrections and suggestions
├── docs/                    Guides: spec, app-ads.txt, sellers.json, schain, setup, FAQ, references
├── examples/
│   ├── ads.txt/             ads.txt files for common scenarios, plus a file of mistakes
│   ├── app-ads.txt/         app-ads.txt for app developers
│   ├── sellers.json/        sellers.json for ad systems
│   ├── schain/              OpenRTB bid request with a SupplyChain object
│   └── server-config/       nginx, Apache, IIS, Express, Next.js, WordPress, Cloudflare
├── CONTRIBUTING.md
├── LICENSE
└── README.md

🤝 Contributing

Corrections, new examples, server configs, verified certification IDs and good references are all very welcome. Spotted something wrong or out of date? Open an issue. See CONTRIBUTING.md: in short, use placeholder IDs, cite official sources, and keep it practical.

Contributors

Contributors

💖 Sponsors

ads.txt is free and always will be. It's part of the AI Bots DB family, and sponsorships support all of its projects.

Who You get
☕ Individuals Any amount, monthly or one-time Our thanks, a sponsor badge on your GitHub profile, and your name in this README
🚀 Companies Publishers, ad tech platforms and agencies Your logo in this README and on aibotsdb.com, with a link to your website
🏛️ Founding sponsors The first companies to back the project A large logo at the top of this README and the website, and a say in the roadmap

Become a sponsor →

🧩 The family

Project Job
ads.txt Declare who may sell your ad inventory
webmanifest Make your site installable as an app
robots-dot-txt Tell crawlers what they may visit
llms-dot-txt Tell AI assistants what to read
AI Bots DB Know which AI bots visit, and block the ones you don't want
user-agents.txt Recognize every kind of bot in your traffic

Disclaimer

This is an independent community reference. It is not affiliated with or endorsed by IAB Tech Lab. The official specifications are authoritative. All account IDs in this repository are placeholders: always copy the exact lines your own partners give you.

License

MIT

About

Everything about ads.txt, app-ads.txt, sellers.json and schain: docs, examples, server configs and validation.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors