If you run ads on a website or a streaming app and you are not earning what you expect, an ads.txt or app-ads.txt file is one of the first things a buyer checks. These two plain-text files tell the programmatic market exactly who is allowed to sell your ad inventory. Get them wrong and premium demand quietly skips you; get them right and you close the door on a whole category of ad fraud. Here is what each file is, why the IAB created them, where to host them, and sample files you can copy.
What ads.txt and app-ads.txt actually are
Both are simple, public text files that list your authorized digital sellers - the ad exchanges, SSPs, and resellers you have approved to sell your inventory, along with your account ID at each one. ads.txt (Authorized Digital Sellers) covers websites, including one built with a streaming website builder. app-ads.txt covers apps: mobile, OTT, and connected-TV.
A buyer's system downloads the file and only bids on your inventory when the seller offering it appears in your list. If a selling path is not declared in your file, the bid is treated as unauthorized and dropped. That single rule is what makes the files so powerful.
Why these files came into existence
Before ads.txt, programmatic buying had a spoofing problem. A fraudster could run a low-value site, label its inventory as a premium publisher in the bid request, and resell it through an exchange. Buyers thought they were paying for premium reach; the money went to the spoofer instead of the real publisher.
The IAB Tech Lab released ads.txt in 2017 to close that hole. By letting a publisher publicly declare its authorized sellers, buyers could verify that whoever was offering 'premium-site.com' inventory was actually allowed to sell it. app-ads.txt followed in 2019 to extend the same protection to mobile and CTV apps, which had no web domain of their own to anchor the declaration.
The result: domain and app spoofing became far harder, unauthorized reselling was exposed, and ad dollars that were leaking to fraud started flowing back to legitimate publishers.
ads.txt vs app-ads.txt: the difference is where they live
The file format is identical. What differs is how a buyer's crawler finds the file:
- ads.txt is hosted at the root of your website domain:
https://yourdomain.com/ads.txt. Crawlers look there automatically because they already know the site's domain. - app-ads.txt is hosted on the developer website you declare in each app store listing. A crawler reads your app's store page (Roku, Apple App Store, Google Play, Amazon, Samsung, LG), finds the developer website URL, then fetches
https://that-domain.com/app-ads.txt. So before you publish an Android app on Google Play, make sure the developer website in that listing is the domain hosting the file.
This is the step most CTV publishers miss: if your Roku or Fire TV listing has no developer website, or points to a domain with no app-ads.txt, buyers cannot verify your app and demand quietly drops.
Where to host them, exactly
- Web:
https://yourdomain.com/ads.txt- the root domain (the public suffix plus one label, such as example.com or example.co.uk), not a subfolder. A subdomain can have its own file when the root file points to it withsubdomain=. - Apps:
https://developer-domain.com/app-ads.txt- where 'developer-domain.com' is the website listed in your app's store listing. Use one domain across all your apps and list every store's seller relationships in that one file.
Serve the file as text/plain with an HTTP 200, over HTTPS. The specification is strict about the details: any other content type is treated as an error and the file is ignored, and a 404 is read as "no seller is authorized", not as "no file yet". Redirects are allowed within the same root domain (http to https, for example), plus a single hop to a different domain; anything beyond that is an error. A login wall stops the crawler cold.
The file format, field by field
Each non-comment line is either a seller record with four comma-separated fields, or a variable=value line. These are the fields as the IAB Tech Lab ads.txt 1.1 specification defines them:
| Field | Name | Required | What goes in it |
|---|---|---|---|
| 1 | Advertising system domain | Yes | The canonical domain of the SSP or exchange that bidders connect to, such as google.com. Use the domain the SSP tells you to. |
| 2 | Publisher account ID | Yes | Your seller account on that system, exactly as it appears in bid requests (publisher.id in OpenRTB). |
| 3 | Relationship | Yes | DIRECT if you control the account, RESELLER if you authorized someone else to sell through it. Case-insensitive. |
| 4 | Certification authority ID | No | The system's TAG ID. The spec notes that sellers.json now supersedes it and that it may be deprecated. |
The variables are all optional, and each one arrived with a specific version of the spec:
| Variable | Added | What it does |
|---|---|---|
contact | 1.0.1 (2017) | A human contact for the file's owner: an email address, a phone number or a contact-page link. |
subdomain | 1.0.1 (2017) | Points crawlers to a subdomain's own ads.txt. Only the root domain's file may use it. |
inventorypartnerdomain | 1.0.3 (2021) | Names a partner whose inventory runs inside your site or app, which is common in CTV. Crawlers follow it to that domain's ads.txt, not its app-ads.txt. |
ownerdomain | 1.1 (2022) | The business domain that owns the site or app. It should match sellers.domain in your SSPs' sellers.json entries, and only the first instance counts. |
managerdomain | 1.1 (2022) | The domain of an exclusive or primary partner that sells your inventory, optionally with a country code (partner.com,US). Use it only when someone else manages your monetization. |
Annotated sample files
An ads.txt for a website, with a comment on every line. Anything after a # is ignored, so inline comments are safe:
# ads.txt for example.com - served at https://example.com/ads.txt as text/plain
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0 # our own Google Ad Manager account
rubiconproject.com, 16414, DIRECT, 0bfd66d529a55807 # a direct Magnite account
pubmatic.com, 158096, RESELLER, 5d62403b186f2ace # a partner sells our inventory via PubMatic
appnexus.com, 3656, RESELLER, f5ab79cb980f11d1 # another authorized reseller
contact=adops@example.com # who to email about this file
ownerdomain=example.com # the business that owns this site
subdomain=video.example.com # video.example.com has its own ads.txt
The app-ads.txt for a CTV or mobile publisher uses the same syntax, hosted on the developer domain from your store listings. Field 4 is optional, so leave it out rather than guess:
# app-ads.txt - served at https://example.com/app-ads.txt
# example.com is the developer website in our Roku, Fire TV and Google Play listings
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0 # Google Ad Manager
magnite.com, 1234, DIRECT # Magnite, CTV demand
freewheel.tv, 56789, DIRECT # FreeWheel
pubmatic.com, 158096, RESELLER, 5d62403b186f2ace # authorized reseller
inventorypartnerdomain=partner-network.com # a partner's inventory runs in our apps
Replace every account ID with the value each SSP gives you; the ones above are placeholders. If you want to declare that no one is authorized, do not publish an empty file (that method was deprecated after March 2020). Publish the spec's placeholder line instead: placeholder.example.com, placeholder, DIRECT, placeholder.
Build or check your file in seconds with our free ads.txt & app-ads.txt validator and generator - it flags field-count, DIRECT/RESELLER, and app-ads.txt placement problems before buyers do.
How buyers and crawlers use the files
DSPs, verification vendors, and the SSPs themselves crawl ads.txt and app-ads.txt on a regular cadence - typically daily to weekly. They cache your authorized list and, at auction time, check whether the seller in the bid request is on it. Unauthorized sellers are filtered out before a bid is ever placed.
The practical consequence: a new SSP you onboard will not generate revenue until its line appears in your file and the crawlers re-read it. Always add the seller record before you expect spend to start.
Common errors and how to fix them
| What you see | Likely cause | Fix |
|---|---|---|
| Spend never starts on a new site or app | The file returns 404, which the spec reads as "no seller is authorized", or it sits behind a login | Serve a public 200 at /ads.txt or /app-ads.txt |
| The file exists but crawlers ignore it | It is served as text/html or another content type | Serve Content-Type: text/plain, ideally with charset=utf-8 |
| The file is ignored after a redirect | More than one hop off your root domain | Keep redirects on your root domain, with at most one hop to another domain |
| A CTV app shows as unverified | No developer website in the store listing, or app-ads.txt hosted on a different domain | Add the developer URL and host app-ads.txt at the root of that domain |
| One SSP's spend is missing | An account ID typo, or a DIRECT/RESELLER label that disagrees with the SSP's sellers.json | Copy the exact line the SSP gives you and check it against their sellers.json |
| A new partner earns nothing for days | Crawlers have not re-read the file yet | Add the line before the campaign starts, not after |
| "No sellers" is intended but buyers still flag the site | An empty file, a method deprecated after March 2020 | Publish the placeholder line instead |
| Inventory on a subdomain is unverified | The subdomain has its own file but the root file does not point to it | Add subdomain= to the root file |
| A partner's inventory inside your app is unverified | No inventorypartnerdomain line, or the partner has no ads.txt on its domain | Declare the partner domain; crawlers follow it to that domain's ads.txt |
| Old partners still listed | The file went stale when the demand stack changed | Review the file every time you add or drop a partner |
The bottom line
ads.txt and app-ads.txt are five minutes of setup that protect every dollar of programmatic revenue you earn. Build them from your real seller relationships, host them at the root of the correct domain as text/plain, and keep them current as partners change. On Broadcast Network and up, OTTEngine's Roku, Fire TV, Android TV and web apps play the VAST tags you bring, and the two files stay yours: check them with the free validator whenever your demand stack changes, then start a free trial to set up ads in your own channel.
Frequently Asked Questions
What is an ads.txt file?
A public text file at the root of your website (https://yourdomain.com/ads.txt) that lists the ad exchanges and resellers authorized to sell your inventory, with your account ID at each. Buyers use it to reject spoofed or unauthorized sellers.
What is app-ads.txt and how is it different?
app-ads.txt is the app version of ads.txt, for mobile and CTV/OTT apps. The format is identical, but it is hosted on the developer website declared in your app store listing rather than on the app itself.
Where do I host app-ads.txt for a Roku or Fire TV app?
On the developer website URL you set in the app's store listing. The crawler reads that URL from your Roku or Fire TV listing, then fetches https://that-domain.com/app-ads.txt. Make sure the listing has a developer website and that the file returns a public HTTP 200.
Is ads.txt required?
It is not legally mandatory, but it is effectively required to monetize. Most DSPs and SSPs will not buy unauthorized inventory, so without it you lose access to premium programmatic demand.
What is the difference between DIRECT and RESELLER?
DIRECT means you have a direct contract with that ad system. RESELLER means an authorized partner sells your inventory through that system on your behalf. Label each line correctly or the record is treated as invalid.
How often are ads.txt and app-ads.txt crawled?
Buyers and verification vendors typically re-crawl daily to weekly. A newly added seller will not earn until the file updates and the crawlers re-read it, so add the line before you expect spend.
What should an empty ads.txt file contain?
Not nothing. The specification says an empty file is ambiguous and should be ignored after March 2020. To declare that no seller is authorized, publish the single placeholder line: placeholder.example.com, placeholder, DIRECT, placeholder.
What do OWNERDOMAIN and MANAGERDOMAIN mean?
Both arrived with ads.txt 1.1 in 2022. OWNERDOMAIN names the business that owns the site or app, and it should match the domain in your SSPs' sellers.json entries. MANAGERDOMAIN names an exclusive or primary partner that sells your inventory, optionally for a single country.
Can ads.txt be served through a redirect?
Yes, within limits. Redirects inside your root domain, such as http to https, are fine, and one hop to a different domain is allowed. Anything beyond that is treated as an error, and the file is ignored.