How to add ads.txt file in WordPress

earnings at risk-adsense warningEarnings at risk – Warning

You might have come across a warning in your Google Adsense account.

Earnings at risk – You need to fix some ads.txt file issues to avoid severe impact to your revenue.

This warning prompts you to upload a text file to your root domain. This text file called “ads.txt file” allows publishers to take control over who can sell their ad inventory. 

Downloading ads.txt file

Download the ads.txt file from your Adsense account. You can download it by clicking on the “Fix Now” button on the bottom right of the warning. 

create an ads.txt file

If you open the text file, you will find the following record:, pub-0000000000000000, DIRECT, f08c47fec0942fa0


How to add ads.txt in WordPress using Plugins

You should add ads.txt file in your site’s root domain. The ads.txt file should be made crawlable for Google bots.

You can use the following plugins to add the text file to your root domain.

Ads.txt Manager by 10up

Ads.txt Manager is a WordPress plugin that helps to create, manage, and validate your site’s ads.txt from within WordPress.

After activating the plugin, you need to visit the Settings » Ads.txt page to configure Ads.txt Manager plugin settings.

ads txt manager

Ads for WP – Advanced Ads & Adsense Solution for WP & AMP

Ads for WP by magazine3 is an Advanced Ad Inserter built for WordPress & AMP. This plugin is one of the best ads management plugin for WP.

Upon activating this plugin, go to Settings » Advanced » Ads Text Manager and enter the text record in the field provided. Click on the Save button and you are good to go.

ads for wp setting

How to add ads.txt in WordPress without Plugins

You can also add ads.txt file without using any WordPress plugins. This may require some knowledge of accessing your cPanel. We have the step by step process involved for integrating ads,txt file without plugins.

Step 1: Keep the ads.txt file ready

Keep your ads.txt file ready to upload it in the root domain of your site. You can download the file from your Google AdSense account or you can refer to the format to create your own ads.txt file below.


Step 2: Login to your cPanel 

Now Login to your hosting account:

cPanel admin » File Manager » public_html in home directory.

upload option

 Open the public_html folder

public_html cpanel


Step 3: Search for Upload Option in cPanel

Look for the Upload Option in your cPanel. You can find it on the top of the page.

upload option

Step 4: Click Upload 

Find ” Drop files here to start uploading ” or “select file” option. Click Select file. When it asks for the file path to be uploaded, select file path to Desktop.


Select the text file to be uploaded and click Open.

The file will be uploaded to public_html of Root directory of your cPanel. Done. You have uploaded your ads.txt file to Root directory of your c penal. 


How to verify ads.txt file is installed properly

To verify whether your ads.txt file is installed properly in the root domain, go to the ads.txt page on your site.

To access ads.txt file in your site, insert the path /ads.txt after the domain name of your site.


Format of ads.txt file

If you open the text file, you will find the following record:, pub-0000000000000000, DIRECT, f08c47fec0942fa0

The line above has four fields seperated by comma. 

First field is the domain of the seller allowed to sell or resell your inventory.

Second field is your publisher ID (corresponding to the advertising platform)

Third field declares relationship type DIRECT or RESELLER.

Fourth field is optional, and it represents an ID of the advertising platform. 


What is ads.txt?

Authorized Digital Sellers or ads.txt is an IAB initiative that helps ensure that your digital ad inventory is only sold through authorized sellers. IAB is an independent,  non-profit organization that helps companies with technology and standards in the digital ecosystem.

The initiative is supported by leading digital advertising platforms. The primary objective of the Authorized Digital Sellers (ads.txt) project is to increase transparency & trust in the programmatic advertising ecosystem.

Creating your ads.txt file gives you more control over who is allowed to sell ads on your website and helps prevent counterfeit ad inventory from being presented to advertisers.


Examples of ads.txt files

Since Google implemented the ads.txt file somewhat mandatory , many major sites have adopted it to protect themselves from online ad fraud. 


Adding ads.txt: Bottom Line

If you are a publisher and displays ads on your site using Google Adsense, DoubleClick, or Ad Exchange, then adding Ads.txt file is recommended. This will protect your site from online ad frauds.

We have discussed here on how to integrate Authorized Digital Sellers text file in your website using WordPress plugins or without using plugins. 

Rating: 5.0/5. From 2 votes.
Please wait...
Voting is currently disabled, data maintenance in progress.

One thought on “How to add ads.txt file in WordPress

  • October 11, 2019 at 5:06 pm

    Thanks for sharing this. Its a really helpful article. I integrated ads.txt file in my site, thanks to this article.

    No votes yet.
    Please wait...
    Voting is currently disabled, data maintenance in progress.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: