https://target-video.com/wp-content/uploads/2022/05/Example.png

What to do when your Google adsense account shows error for Ads.txt file?

What to do when your Google Adsense account shows error for Ads.txt file?

When you are trying to make revenue through your website or your blogging website, you need to register on Google Adsense account so that Google can run advertisement on your website.

You create your Google Adsense account however it shows the error that your Ads.txt file is not updated on your website. This is required so that Google recognizes you as a authorized seller on Google Adsense platform.

You can follow the below mentioned steps to add ads.txt file your word press website

 

What to do when your Google Adsense account shows an error for Ads.txt file?

Check ads.txt Error in AdSense Account

  1. Log in to Google AdSense
  2. Go to Sites
  3. Select your website
  4. You may see a warning:
    “Earnings at risk – You need to fix ads.txt issues”

This confirms the ads.txt error.

Why ads.txt Error Occurs

The ads.txt error usually occurs because:

  • The ads.txt file is missing
  • The Publisher ID is not added
  • The Publisher ID is incorrect
  • Google cannot verify your authorization to serve ads

This is a common and expected issue for new AdSense users.

https://storage.googleapis.com/support-forums-api/attachment/thread-215145601-4072952330866330416.jpg

https://miro.medium.com/v2/resize%3Afit%3A1400/0%2Aj1oW9L_jq8WsTsay.png

https://storage.googleapis.com/support-forums-api/attachment/thread-184440337-14039946056338765097.jpg

How to Fix ads.txt Error in WordPress

The simplest solution is to use a WordPress plugin.

Step 3: Install Ads.txt Plugin

https://getshifter.io/wp-content/uploads/2024/03/185661546-9143208fe41987fbc7bb35d4.png

  1. WordPress Dashboard → Plugins → Add New
  2. Search for Ads.txt Manager
  3. Install and activate the plugin

Step 4: Find Your Publisher ID

  1. Log in to Google AdSense
  2. Go to Settings → Account information
  3. Copy your Publisher ID

It looks like:

pub-1234567890123456

https://www.wikihow.com/images/thumb/4/48/Find-Your-AdSense-Publisher-ID.png/460px-Find-Your-AdSense-Publisher-ID.png

https://www.wikihow.com/images/4/48/Find-Your-AdSense-Publisher-ID.png

Step 5: Update Publisher ID Using the Plugin

  1. WordPress Dashboard → Settings → Ads.txt
  2. Add the following line (replace with your ID):

google.com, pub-1234567890123456, DIRECT, f08c47fec0942fa0

  1. Save changes

https://target-video.com/wp-content/uploads/2022/05/Example.png

Final Step: Verify ads.txt

  1. Open your browser
  2. Visit:

https://yourdomain.com/ads.txt

  1. Confirm the Google AdSense line is visible

The ads.txt warning in AdSense will disappear within 24–72 hours.