How to Resolve Adsense Ads.txt File Issue

What Exactly is Ads.txt File?

Ads.txt file allows publishers to declare who can sell ads on their website. It is an initiative created by IAB Tech Lab, a non-profit focused on improving digital advertising standards.

The initiative is supported by Google’s advertising platforms like Google Adsense, Doubleclick, and Ad Exchange. It is also supported by many other leading digital advertising platforms.

How to Create and Manage Ads.txt Files in WordPress?

First thing you need to do is install and activate the Ads.txt Manager plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit the Settings » Ads.txt page to configure plugin settings.

Ads.txt manager settings

The plugin provides a simple text area where you can add lines to declare each individual platform or reseller. For example, you can add the following line to declare Google Adsense

Don’t forget to replace pub-0000000000000000 with your own publisher ID.

As you can see, this line has four fields separated by comma. The first field is the domain of the company allowed to sell or resell your ad inventory. After that it has your publisher ID which corresponds to your account ID in the advertising platform.

The third field declares relationship type DIRECT or RESELLER. The last field is optional, and it represents an ID of the advertising platform. For all Google advertising programs, you’ll use the same unique ID.

Troubleshooting Earnings at risk Error in Adsense

A missing declaration in your ads.txt file may result in the following warning message in your Google Adsense account.

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 to your revenue.

This message indicates that your ads.txt file doesn’t have your publisher ID. To fix this message, simply go to Settings » Ads.txt page to make sure that you have correct publisher ID in plugin settings.

Note: Since ads.txt file is supposed to be in the root directory of a domain name, this plugin currently only works for root level domain like It does not work for WordPress installed in subdomain, subdirectory, or a single site in a multi-site network

CC- Wpbegineers


Be the first to comment

Leave a Reply

Your email address will not be published.