Ads.txt error! 2 easy methods to solve it

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.

an example of ads.txt file

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.

Requirements:

For Adsense, You need your publisher id and following the below method you can get your publisher id for the ads.txt file.

  1. Login to your Adsense account.
  2. From Dashboard, Click on Accounts–>Settings–>Account information.

adsense publisher id for ads.txt file

How to solve ads.txt error?

You can resolve this issue using 2 simple methods.

  1. Using a plugin “Ads.txt Manager.
  2. 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.

yourdomain.com/ads.txt

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. 

13 thoughts on “Ads.txt error! 2 easy methods to solve it”

  1. Hey there! Do you know if they make any plugins to safeguard against
    hackers? I’m kinda paranoid about losing everything I’ve worked hard on. Any
    tips?

    Reply
    • Yes there are few plugins that can help with the website security. We will be going to publish an article on it soon. STAY TUNED!

      Reply
  2. I did this a month ago and it worked! A few days ago my Google Ads dissapeared again. I did the same process and the ads arent appearing. Do you know whats going on? Thanks!

    Reply
    • make sure the file is still there with the correct publisher code and check out notification tab on google adsense dashboard for any info.

      Reply
  3. Thank you so much for this straightforward solution. You saved me from adding yet another plugin, I can’t thank you enough. Such thorough tutorial, well done!

    Reply

Leave a Comment