Wondering what is ads.txt, how to create it and add it to your website? Wonder no more, as in this easy guide I’m going to give you the rundown about ads.txt.
I’m sure you’ve heard about ads.txt a few times until now, especially if you’ve started a blog and monetize it with Google AdSense or any other ad network.
Well, let’s get straight into it, and see just what in the heck is an ads.txt file and how to create one for your website.
Table of Contents
What is Ads.txt?
Ads.txt is a text file that stands for authorized digital sellers, and it’s meant to have all the IDs and information of authorized partners and ad sellers.
The ads.txt file is commonly placed in the root folder of a website and it allows for greater transparency between publishers and publishers.
Using an ads.txt file makes it easier to prevent ad fraud because it allows buyers to easily check if the inventory they buy is from legit Authorized Digital Sellers.
The project was first developed by IAB Tech Lab in 2017, and it is now used by all the major ad networks and programmatic platforms including Google AdSense.
Programmatic ad platforms and ad exchanges also have to integrate and use an ads.txt file to confirm the publishers who have an authorized inventory to sell.
What are the benefits of Ads.txt?
The main benefit of using an ads.txt file is the transparancy that it provides both to the publisher and to buyers.
Before this, a buyer had no idea if the inventory they were buying was legit or if it was counterfeited, and sometimes the URL that was used was not accurate and it was used by third-parties that were not authorized to sell that inventory space.
Even though the impressions sold through the OpenRTB platform include the URL and publisher ID, that still leaves a lot of room for interpretation because nobody knows for sure who owns those publisher IDs in the supply chain.
How Does Ads.txt Work?
Publishers can create and implement an ads.txt file for their inventory that is publicly accessible and thus making them authorized digital sellers of their ad space.
Ad buyers can then crawl and identify legit publishers that are authorized to sell digital space, and can then purchase it with more confidence.
If a publisher works with multiple ad networks, platforms and buyers, it is best to add them all to their ads.txt list.
It is recommended to only create one ads.txt file per website and one app-ads.txt per app, regardless of how many ad networks the publishers are working with, they can all be added to just one single file.
Here’s an example of an ads.txt file that you should upload to the root of your server (for example The ads.txt file should be available at the following URL: example.com/ads.txt)
Let’s say that the publisher who has digital ad space on example.com wants to work with 3 platforms: Random Ad Platform, Google AdSense, and AdExchange Example.
This is what their ads.txt file should look like:
Every new ad platform that the publishers want to work with, should add their information to the ads.txt file in a new line.
Publishers can get all this information directly from the platforms that they wish to work with, for example, Google AdSense will show you in your account the information you need to add so that you can just copy/paste it directly to your ads.txt file.
Almost all the ad networks, exchanges, and optimization services will give you their own ads.txt list with the partners that they work with so that you can then copy it to your own list, either in addition to other networks (if you’re working with multiple ones) or to replace them altogether.
Google AdSense – Ads.txt
If you get a notification in your Google AdSense account to implement an ads.txt file then you should do so as soon as possible.
You can check out the step-by-step instructions directly from Google, or you can simply copy and paste the following into your ads.txt file but make sure to replace the PUB-ID with yours:
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
Not only that but Google AdSense publishers should create and upload an ads.txt file even if Google doesn’t notify them about it, because more bidders might fight over their authorized inventory space, and thus the earnings could be higher.
How to Create and Upload Ads.txt
Following the examples from above, creating an ads.txt file of your own is pretty straightforward and simple. You will first need to have access to the IDs that you can get from your ad network, and then simply copy-paste them into a text file.
If you work with multiple ad networks and programmatic platforms, make sure to add each one of them on a new line in the same text file.
Simply save the text file with the name: ads and the file extension .txt, and then upload it to the root of your website.
Make sure to then go ahead and manually verify that the ads.txt is displaying correctly by checking out your website URL as such: example.com/ads.txt
Whenever you start or stop working with an ad network you should update your ads.txt file to either remove the platform that you’re not working with anymore or add a new one.
How to add an ads.txt file to your WordPress site
With your ads.txt file now created, it’s time to upload it to your server.
If you’re using WordPress as a CMS, then you can either use a plugin to do this or simply take the file and upload it as you would normally upload an image via the Add Media option like so:
Another option, even if you’re using WordPress is this one:
How to add an ads.txt file to your site
Take the ads.txt file and upload it directly to your server in the root of your domain name using a FTP client or SSH / SFTP client like FileZilla, Putty, or WinSCP.
The drawbacks of Ads.txt
While ads.txt is widely utilized these days and it does help prevent ad fraud to some extent since it’s not a 100% bulletproof concept.
Still, the drawbacks of using an ads.txt file are that you will have to manually create the file, edit and update it and then re-upload it, every time you join or leave an ad network or platform as a publisher.
Even if it can take just a couple of minutes, most publishers would rather spend their time doing something more productive such as promoting their blog rather than fiddling with text files.
Other publishers might get confused and edit or remove the wrong ad network line, while many would simply not bother or forget to create one in the first place and not keep it updated.
No, ads.txt file is not mandatory, although it’s highly recommended to use one. Major ad platforms will require or ask their publishers to implement this file to protect buyers from inventory ad fraud.
You will have to upload the file to your root domain, via FTP, SSH or SFTP, or upload it from your WordPress dashboard. The ads.txt file should be accessible at the following URL: example.com/ads.txt
You can use any text editor to create the ads.txt file, just make sure to save the file with the .txt extension. Notepad works just fine.
App-ads.txt is the same concept, only that it’s focused for apps. You will have to only create one app-ads.txt file and keep it updated to protect your app against ad inventory fraud.
If buyers (ad platforms) have implement an ads.txt file of their own, they can use it to compare IDs with a publisher’s Ads.txt file, if the IDs match, then the buyers know that the publishers are authorized to sell their digital space.
If you’re monetizing with blog ads, chances are that you will have to implement an ads.txt file sooner rather than later, and I’m sure most ad networks have already notified you about creating and uploading one.
It shouldn’t take longer than 5 minutes to get it over with, and the benefits are that you might get to increase your ad revenue since more buyers will confidently purchase more of your digital ad inventory.
But even if you don’t see a bump in your pay, at least you get to keep Google and other ad platforms happy, since they are relentless with their annoying notifications.
Let me know if this guide helped, and don’t forget to share it with the world.