Are you getting ads.txt error notification on your Adsense dashboard, stating that your earnings are at risk?
Well, I am getting a lot of queries regarding this. Therefore, I decided to write about it and How to get rid of it. Let’s understand the concept of Ads.txt and How to resolve the ads.txt error.
Whats is Ads.txt
Ads.txt is a standard text file approved by IAB – Interactive Advertising Bureau that consist of your publisher ID and the Company domain name that is authorised to serve ads, it looks something like this.
Why it is necessary?
Within the ads.txt file, you specify any ads company that you are authorising to sell their products or services on your website, this helps in preventing internet fraud, and a buyer can easily confirm that they see ads from some authorised companies and trustworthy sources.
For Adsense, You need your publisher id and following the below method you can get your publisher id for the ads.txt file.
- Login to your Adsense account.
- From Dashboard, Click on Accounts–>Settings–>Account information.
How to solve ads.txt error?
You can resolve this issue using 2 simple methods.
- Using a plugin “Ads.txt Manager”.
- Creating and Uploading ads.txt file directly to root directory.
Using a plugin is the simplest method one can use, but many people avoid plugins just because they are already struggling with too many plugins and they don’t want more plugins on their website. Don’t worry, I will write about both methods.
Resolve Ads.txt error using the plugin.
- Go to Plugins –> Add New
- Search for “Ads.txt Manager”
- Click Install and Activate
- Copy the below code
google.com, pub-0000000000000, DIRECT, f08c47fec0942fa0
- Go to Settings –> Ads.txt
- Paste the code, replace 0000000000000 with your publisher id
- Click save changes
Fix Ads.txt error without plugin
- Open Notepad File
- Paste the above code in it
- Replace the 00000000000 with your publisher id
- Click on File and Save
- Give it a name “Ads.txt”, Save it
Uploading ADS.TXT File to your root domain
- Login into your Cpanel
- If you don’t have direct access, log in into your hosting account
- Click on Cpanel
- Click on File Manager
- Check the root directory
- upload to ads.txt file
Check your Ads.txt file with the following path.
If you see the text without errors then you are done. Comment below if you need help with it.
If you like this Guide don’t forget to Subscribe our newsletter and get all the WordPress tips & tricks, updates and technical help at one place.