When I logged into my Google AdSense account yesterday, I saw a red warning saying that one or more of my websites does not have an ads.txt file. In this tutorial, you’ll learn how to solve this problem.
Note! These instructions describe how to create an
ads.txtfile for Google publishers. Non-Google publishers should contact their SSP or exchanges.
This article is about the
ads.txtfile. For information about the
app-ads.txtfile, I recommend reading another article.
What causes this issue
Earnings at risk - One or more of your sites does not have an ads.txt file. Fix this now to avoid severe impact to your revenue.
In my case, the above message appeared spontaneously on June 6th. This message is self explanatory. It means that we have not added an
ads.txt file to one or more of our websites. Google strongly recommend that we use an
ads.txt file. It can help buyers identify counterfeit inventory and help us receive more advertiser spend that might have otherwise gone toward that counterfeit inventory.
«Authorized Digital Sellers», or «ads.txt», is an IAB initiative to improve transparency in programmatic advertising. Publishers can create their own ads.txt files to identify who is authorized to sell their inventory. The files are publicly available and crawlable by buyers, third-party vendors, and exchanges. You can learn more about an
ads.txt file at the following links:
- IAB Tech Lab: About ads.txt
- Google AdSense: Declare authorized sellers with ads.txt
- Google Ad Manager: Ads.txt management in Ad Manager
Now we know what caused this red warning.
How to solve it
To solve this problem, we need to add an
ads.txt file to the root level of our domain (for example,
https://example.com/ads.txt). Now, step by step guide.
Create a text (
.txt) file named
ads.txt on your computer (we will move this file later) by using any text editor.
Note! If you have the Mac computer then just use the TextEdit app that ships with every macOS in order to create this file. Save the file in the
Include the following line in the
ads.txt file you just created:
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
Important! Make sure you replace
pub-0000000000000000with your own publisher ID.
ads.txt file to the root directory of your website. Make sure you save the file.
You can do this by using cPanel or accessing your server via FTP or SFTP. If you aren’t sure how usually your web hosting provider will have instructions somewhere on their website.
Finally, you can visit your website and verify that you have the
ads.txt file now. For example,
That’s it, you’re done. So simple isn’t it?
Changes require some time and do not take effect immediately. Patiently wait for Google AdSense to check if the
ads.txt file is added correctly. In my case, it took 6 days.
If you are having trouble fixing this problem with the instructions above, but are being able to solve this problem with any another method please describe it in the comment section below. Thanks!
If this article has helped you solve the problem then please leave a comment
Thanks for reading!