How To Fix Ads.txt Error On Google AdSense

By
https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js (adsbygoogle = window.adsbygoogle || []).push({});

Most bloggers cum AdSense publishers (Myself included) started seeing an error notification on our AdSense dashboard that reads;

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.”
Fix ads.txt error
If you received this message on your dashboard, worry no more, because we are going to show you how to resolve this Ads txt error message.



What Is Ads.txt?

According to Google AdSense Help Centre, Authorized Digital Seller, Ads.txt is an IAB initiative that helps ensure that your digital ad inventory is only sold through sellers (such as AdSense) who you’ve identified as authorized. Creating an ads.txt file gives you more control over who’s allowed to sell ads on your site and helps prevent counterfeit inventory from being presented to advertisers.

Read Also: How to install and setup Xenforo on Localhost

What Is Google AdSense Publisher’s ID?

Google AdSense Publisher ID is a unique 16 digit number used to identify an individual publisher account. It is also used for account security and to find account specific details.

How Can I Locate My Google AdSense Publisher ID?

As said earlier, Google AdSense publisher ID is an integral part of your account. This ID will be part of your Ads.txt file. So before we proceed further, let see 4 ways we can locate our AdSense Publisher ID.

In your AdSense account



  1. Sign in to your AdSense account.
  2. Click Account.
  3. In the “Account information” section, see the “Publisher ID” field.

On the My AdSense page in the AdSense Help Center

  1. Visit the My AdSense page in the AdSense Help Center.
  2. If you’re not already signed in, sign in to the Google Account you use to access AdSense.
  3. Find your publisher ID in the “This email is associated to the AdSense account” field.

In an email you received from AdSense

Search your inbox for an email from Google AdSefile. for example, your “Welcome to AdSense” email. You can find your publisher ID at the top of the email.

In your AdSense ad code

Alternatively, you can find your publisher ID in the ad code on your site:

  1. In your browser, open a page that you show ads on.
  2. View your page’s source code (e.g., in Chrome, click ViewDeveloper, and then View Source).
  3. In your HTML source code, find a piece of ad code. For example, search for the term “adsbygoogle“.
  4. In the ad code, find the line that contains your publisher ID:<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <!-- Example ad unit -->
    <ins class="adsbygoogle"
    style="display:block"
    data-ad-client="ca-pub-1234567891234567"
    data-ad-slot="1234567890"
    data-ad-format="auto"
    data-full-width-responsive="true"></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>

How To Fix Missing Ads.txt Error On Google AdSense For WordPress

Ads.txt Error on Google AdSense is as a result of not adding an ads.txt file to the root folder of your domain. This can be easily rectified and we are going to show you how. Let proceed on how to fix this error.



Open notepad or any text editor on your PC or Android smartphone. Type the following details on your preferred text editor.

google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

Note: Make sure you replace pub-0000000000000000 with your own publisher ID.
Save the file as ads.txt, and upload it to you public_html folder.

How To Set Up an ads.txt File On Blogger Manually

Go to your Blogger Dashboard

Select which of the blogs affected as stated in the notification this is very important, That’s If you have multiple blogs on the same blogger account.

Click on Settings Gear button

Click on Search Preferences

You will find a new option called Monetization which was recently added by Google, and by default, it will be disabled.

Click on it to enable it and then move to next step of operation.

Open your Adsense Account, you will see notification at the top of the dashboard telling you that “Earnings at risk – One or more of your ads.txt files doesn’t contain your AdSense publisher ID. Fix this now to avoid severe impact on your revenue.”

It always red in color, Click on the action button and you’ll be taken to your Adsense sites management page.

Google will automatically generate an Adt.txt file for you, now copy the code which will look similar to this google.com, pub-XXXXXXXXXX, DIRECT, XXXXXXX (please note that each Adsense account has his own unique code). Yours is different from mine.

Then paste the code You have copied from your Adsense dashboard into the Monetization space in step 5 above.

Now save your changes and wait for at least 12 to 24hours or 48hours in some cases before Google to pick up your changes and your authorizations.

This is the time it will take Google to Index it. Once it is indexed by Googlebots, the error message will disappear from your AdSense dashboard.
If you are having any difficulty about fixing your ads.txt error, let us know through the comment box and we will be glad to help.
https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js (adsbygoogle = window.adsbygoogle || []).push({});
2 Comments
  1. Kyle 3 months ago
    Reply

    Nyc….so informative and Thank you for sharing

    • Alfred Abusomwan 3 months ago
      Reply

      Thanks Kyle, we will always do our best to share informative posts to you.

Leave a Comment

Your email address will not be published.

You may also like

https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js (adsbygoogle = window.adsbygoogle || []).push({});