Ads.txt
Setting up an ads.txt file helps protect advertisers from fraud, which means you can generate more ad revenue from your site.
The ads.txt protocol was developed by the Interactive Advertising Bureau (IAB). ADS: Authorized Digital Sellers. With an ads.txt file, you can list the approved sellers authorized to send requests to advertisers and sell your site's ad inventory.
This protocol achieves two key goals:
- It gives advertisers full visibility into who is authorized to buy and sell specific ad inventory on your site.
- It blocks low-quality placements and domain spoofing — a type of fraud where scammers disguise cheap traffic and sell it at premium rates.
How it works
Before purchasing a site's inventory, a DSP scans its ads.txt file to verify which ad sources are authorized sellers. The DSP will only accept requests from ad sources listed in the file and authorized by the site developer.
Note
If you manage multiple domains, make sure you've uploaded the ads.txt file to each of them.
To view an ads.txt file, simply type ads.txt at the end of the site's domain in your browser's address bar (like example.com/ads.txt) and press Enter.
This is how advertisers check if the platform selling your site's inventory is an authorized seller. If the platform is not on the list, it might be selling poor-quality mediakits.
Advantages of publishing ads.txt
-
It lets you boost your media kit's monetization. Publishing your official seller list proves that your media kit is authentic. Major agencies often buy inventory through DSPs, which check sites for authorized ad sources.
-
It prevents fraud and builds trust in programmatic buying: by explicitly listing your authorized sellers in the ads.txt file, you protect your domain from spoofing and fake impressions.
If you don't upload an ads.txt file:
- DSPs may restrict ad buying on your site.
- You lose access to the ad budgets of major brands and agencies.
- There's a higher risk that ads intended for your site will be served elsewhere through unauthorized sellers.
As a result, you may see a drop in your ad revenue.
How to add Yandex and its partners as authorized sellers for your site
Step 1. Get the ads.txt entries from all your ad networks
Every ad network will provide a snippet of code for you to add. Contact your ad network and ask for the specific lines for your ads.txt file.
Note
You can obtain a special code snippet through the Yandex Advertising Network interface. To download the file with your specific entries, go to Settings → General and click ads.txt.
Line structure
-
The line contains the domain of the ad platform, the partner ID, and the type of relationship with the seller.
Example:
example.com, 1234, DIRECT.The following seller relationship types are available:
- DIRECT: Ad networks you work with directly.
- RESELLER: Partners that use third-party intermediaries to sell media kits.
Avoid adding information about companies you don't work with to the code.
Step 2. Create a file
Open any text editor (such as Notepad), list the lines from all ad networks, and save the file as ads.txt.
Step 3. Upload the file
Add the ads.txt file to the root directory of the developer's site. A root directory is the folder that follows the top-level domain (such as example.com/ads.txt).
Note
The file must meet the IAB Tech Lab ads.txt specification. If you manage multiple domains, make sure to upload the ads.txt file to each of them.
To check if everything is correct with your file, add ads.txt to the end of your domain in the browser's address bar (such as example.com/ads.txt) and press Enter.
Step 4. Update the file regularly
Ad networks' partners may change. Update your ads.txt file at least once a month so that new authorized sellers can trade your ad inventory.