Did you get a notice in your AdSense account requiring that you put your AdSense publisher information on a published ads.txt file on your site?
If you don’t comply, your earnings will be much lower or even nothing.
In fact, all ad networks are requiring publishers to place an ads.txt file on websites with display ads.
This is in an effort to prevent display ad fraud.
Fortunately it’s easy to do.
How to create an ads.txt file listing advertisers
If Using AdSense
In your AdSense account, AdSense prompts you to click the Ads.txt requirement notification which will then generate the exact snippet you need to put into the ads.txt file. The snippet should look exactly like the following but have your publisher information:
google.com, pub-XXXXXXXXXXXXXXXX, DIRECT, YYYYYYYYYYYYYYY
In fact, here’s a screenshot of a scaled down Ads.txt file I use (all account info removed):
Screenshot of ads.txt file:
I’d give you a download to use, but I fear then if ever I run ads on this site, It’ll cause issues with advertisers given it’s a .txt file with advertiser names on it. As you can see from the screenshot above, it’s super easy to generate.
The AdSense snippet is at the top followed by others. Note, you don’t have to AdSense at the top. I can be anywhere.
You must place only one advertiser per line.
If using an ad network like Media.net
They will provide you your ads.txt file. They did for me. Other ad networks did the same.
How to add an ads.txt file to your WordPress website
If using WordPress, go into your media library and upload it. That’s it, you’re done. Here’s a step-by-step screenshot.
Can I have two ads.txt files on my website?
I do and it’s not been a problem. I’m not sure if it’s technically incorrect. However, if you have two ads.txt file and you have AdSense on your site, you need to put your AdSense snippet on both. I received the warning from AdSense because while I had the snippet on one ads.txt file, it wasn’t on the other which triggered a warning (and a loss of 1 day’s AdSense revenue).
Adam Smith, who works for an advertising network, was nice enough to clarify this question. Here’s what he told me:
A site can only have 1 valid ads.txt file and it must be placed on the route domain:
You can have one on a subdomain but you will still need one on the route domain and that should reference the subdomain ads.txt file (to be honest this is a super rare case).
Do you have to have one? Technically no. However that could change soon. At the moment if you have any ads.txt file an advertising network will check if they are in there and if not, they probably won’t buy your traffic. If you don’t have an ads.txt file they carry on as normal.
However, there is chatter than in June or July Google will be enforcing ads.txt. At the moment if you don’t have an ads.txt file then Google will carry on buying inventory from you as normal. Once they enforce it then they won’t buy from any site without an ads.txt file. And I assume that most other networks would then follow their lead.
How long does it take for revenue to return once adding AdSense to ads.txt file?
About 24 hours. AdSense tells you this much and it’s true. I got a warning for not having the AdSense info on one of two .txt files. I added it to the other and within 24 hours, I was earning again.
Do I need to place an ads.txt file for every ad network?
I work with 2 ad networks so I have two. I suspect I could consolidate them, but I don’t bother. Moreover, these files will change. In other words, your ad network will provide you updated versions that you will need to update. Therefore, I think it’s easiest having two such files.
Do I have to have an ads.txt file if I only use AdSense?
As far as I can tell, no, you don’t. I have a site where I only use AdSense so I don’t have an ads.txt file on it and there’s no problem. The AdSense notification is sent to you when you place an ads.txt file on your site required by some ad network but you don’t have your AdSense publisher information on that ads.txt. However, perhaps in the future AdSense will require an ads.txt file even if you only use AdSense.
What if I didn’t get such a notice from AdSense and don’t have an ads.txt file, should I be concerned?
I don’t think so. For now it seems the issue arises only if you have an ads.txt file missing your AdSense publisher information. However, there’s no harm in adding one anyway.
Jon Dykstra is a six figure niche site creator with 10+ years of experience. His willingness to openly share his wins and losses in the email newsletter he publishes has made him a go-to source of guidance and motivation for many. His popular “Niche site profits” course has helped thousands follow his footsteps in creating simple niche sites that earn big.