Technically reviewed by Aditya
What is ads.txt?
Ads.txt, or Authorized Digital Sellers, is an initiative launched by the Interactive Advertising Bureau (IAB) in 2017 to combat ad fraud. Ads.txt is a publicly accessible text file that lists all of the authorized sellers of your website’s ad inventory.
When ad buyers purchase ad space through an authorized seller, they can be confident that the ads are being served on your website and not on a fraudulent website. This helps to protect your brand reputation and to ensure that your advertising budget is being used effectively.
How to implement ads.txt
To implement ads.txt for your website, you will need to create a text file called ads.txt and place it in the root directory of your website. The file should contain a list of all of the authorized sellers of your website’s ad inventory, one per line. Each line in the ads.txt file should contain the following information:
• The domain name of the authorized seller
• The seller’s account ID
• The relationship type between you and the seller
• Optionally, a certification authority ID for the ad system (the IAB Tech Lab spec marks this fourth field as optional)
Ads.txt example
Here is an example of an ads.txt file. Both IDs are placeholders: swap in the real values your partners give you.
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
exchange.example.com, PLACEHOLDER-12345, RESELLER
This ads.txt file lists two authorized sellers. The first line is the AdSense line, with pub-0000000000000000 standing in for your own publisher ID. Its relationship type is DIRECT, which means you control that account yourself. The second line uses a made-up exchange domain and ID. Its relationship type is RESELLER, which means you have allowed another company to control that account and resell your ad space through that exchange.
Reading each line, field by field
| Field | DIRECT line | RESELLER line | What it means |
|---|---|---|---|
| 1. Ad system domain | google.com | exchange.example.com | The domain of the SSP or exchange that buyers connect to. Required. |
| 2. Account ID | pub-0000000000000000 | PLACEHOLDER-12345 | Your seller account ID on that system. It must match the ID the system sends in bid requests. Required. |
| 3. Relationship | DIRECT | RESELLER | DIRECT if you control the account. RESELLER if someone you have authorised controls it. Required. |
| 4. Certification authority ID | f08c47fec0942fa0 | (left out) | An ID for the ad system with a certification body such as TAG. Optional, and the spec notes it may be deprecated later. |
Lines that start with # are comments, so you can label each partner’s block without breaking the file.
ads.txt variables you may see
Besides seller lines, the spec allows variable lines written as VARIABLE=value. These are the ones in the current version, ads.txt 1.1:
| Variable | Added in | What it does |
|---|---|---|
| CONTACT | 1.0.1 (August 2017) | Human-readable contact for whoever owns the file, such as your ad ops email. Optional. |
| SUBDOMAIN | 1.0.1 (August 2017) | Points crawlers from the root domain to a subdomain that has its own ads.txt. Optional. |
| INVENTORYPARTNERDOMAIN | 1.0.3 (final release March 2021) | Points to the domain of a partner allowed to monetise inventory inside your content, mainly for CTV and similar cases. Recommended where relevant. |
| OWNERDOMAIN | 1.1 (final release July 2022) | The business domain of the company that owns the site. It should match the domain in your sellers.json entries. Recommended. More on OWNERDOMAIN. |
| MANAGERDOMAIN | 1.1 (final release July 2022) | The domain of a primary or exclusive monetisation partner, used only when you do not sell your own inventory in a market. Optional. |
Source: IAB Tech Lab ads.txt 1.1 specification.
Once you have created your ads.txt file, you need to upload it to the root directory of your website. You can then check that it is working with the RediAds ads.txt checker.
Where the file lives and how buyers read it
The file goes on your root domain at /ads.txt, for example https://example.com/ads.txt, served as plain text. The spec tells crawlers to prefer HTTPS when the file is available over both HTTPS and HTTP, so make sure the HTTPS version loads. Crawlers also cache the file. If your server sends no cache headers, the default expiry in the spec is 7 days, so a fix may not show up straight away.
Fix the ads.txt “not found” and “unauthorized” warning in AdSense
AdSense shows “Not found” when it cannot find an ads.txt file on your site, and “Unauthorized” when the file exists but your publisher ID is missing from it. The fix is the same four steps either way.
- Copy the snippet from AdSense (Sites, then the site with the warning). It looks like
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0, with your own publisher ID in place of the zeros. - Paste it into ads.txt and upload the file to your root domain, so it opens at yourdomain.com/ads.txt in a browser. If you are not sure where the root directory is, your site builder or hosting provider can tell you.
- Check the file with the RediAds ads.txt checker to catch formatting problems.
- Wait, then click Check for updates on the Sites page. Google says changes can take a few days to show in AdSense, and up to a month if your site doesn’t make many ad requests.
Source: Google AdSense Help, Ads.txt guide.
Go deeper
- Glossary: ads.txt, DIRECT vs RESELLER, OWNERDOMAIN, app-ads.txt
- Learn videos: Fix the “earnings at risk” ads.txt alert, ads.txt and sellers.json, ads.txt: OWNERDOMAIN and MANAGERDOMAIN explained
- Academy: Level 5, ads.txt & Authorized Sellers
- Related reading: AdTech supply chain transparency and Beware of spoofed domains
Not sure your file is clean? Paste your domain into the ads.txt checker and see which lines buyers may ignore.
Learn in 60s
Short vertical lessons from our team. Tap to watch, swipe for the next.
1:13Ep 5: AdCP vs AAMP, do you have to pick one?Ep 5: AdCP vs AAMP, do you have to pick one?
1:02Ep 4: adagents.json, the guest list for AI agentsEp 4: adagents.json, the guest list for AI agents
1:08Ep 3: Completed isn’t live: two statuses of a media buyEp 3: Completed isn’t live: two statuses of a media buy
1:07Ep 2: Products, not placementsEp 2: Products, not placements
1:04Ep 1: AdCP, how AI agents buy adsEp 1: AdCP, how AI agents buy ads
1:16Prebid 10 and 11: what changed in your wrapperPrebid 10 and 11: what changed in your wrapper
1:04App developers: from AdMob alone to in-app biddingApp developers: from AdMob alone to in-app bidding
1:04CTV publishers: from one app to many buyersCTV publishers: from one app to many buyers
1:01Web gaming sites: rewarded and interstitial adsWeb gaming sites: rewarded and interstitial ads
1:05Finance publishers: high CPMs and strict brand safetyFinance publishers: high CPMs and strict brand safety



