How to Create and Manage Ads.txt files in Blogger BlogSpot and WordPress?

How to fix ‘Earnings at risk – One or more of your ads.txt files doesn’t contain your AdSense publisher ID’ error in google AdSense to avoid severe impact to your ad revenue? How to Insert AdSense Publisher ID and enable Custom ads.txt in Blogger?
How to Add Custom Ads.Txt File in Blogger?

Ads revenue is the major source of blogger’s income. There are zillions of website owners and Bloggers are living on ads revenue. 

Through different Ads networks advertising companies placing and displaying their ads in different websites. But for protecting publishers from ad fraud and increasing the ad revenue ads.txt file must be use in their blog and website to declare who is authorized to sell your inventory with ads.txt. 

If you want to create and manage ads.txt file in BlogSpot and WordPress site, in this tutorial we will explain the whole process through step-by-step guide. 

What is ads.txt? 

The simple answer is this is a text file that contains information about different advertising networks. And by using this ads.txt file website owner authorize the advertiser to show their ads in publisher’s website. 

“Ads.txt” is a project (also known as Authorized Digital Sellers) put forth by the IAB Technology Laboratory. 

The main concept behind using the ads.txt files to protect publisher from frauds and malware script, as well as you are authorizing the ads network to display ads in your website. 

Why ads.txt is important? 

This is very important and compulsory for every publisher to use ads.txt in their website. By inserting ads.txt code or uploading the file you are giving permission to companies that can sell inventory. It can also eliminate fraud inventory for advertiser who spend more amount on advertisement. Simply this is an advance technology to protect digital ad market from bad player. 

AdSense users must use ads.txt because without this they won’t able to generate ad revenue. So AdSense publishers must be use this. 

What information goes in an ads.txt file? 

Generally we have to include 4 pieces of data in an ads.txt file, those information are as follows: 

  1. The domain name of the advertising system – This data is compulsory for writing ads.txt file. This means you have to use domain name of advertiser. For example, AdSense users like Google seller publisher must use google.com as advertiser domain. 
  2. The publisher’s account ID – Every advertiser company provides unique publisher ID with ad code. Here we have to add publisher ID in ads.txt file. For example, AdSense use will see unique publisher ID with all ad script. This is look like this pub-xxxxxxxxxxxxxxxx. 
  3. Type of account/relationship – Under types of account we have to add a value to indicate the relationship. There are 2 types of account we can use. A) DIRECT B) RESELLER  
  4.  Certification authority ID – This is optional field, either you can use or not. This is also known as Trustworthy Accountability Group (TAG). The TAG uses as an authority ID to identify the advertising system. For Google seller accounts, the TAG ID is f08c47fec0942fa0. 

So the complete ads.txt code will looks like below- 

Google.com, pub-xxxxxxxxxxxxxxxx, DIRECT, f08c47fec0942fa0 

You can insert the above code snippet by replacing xxxxxxxxxxxxxxxx by your AdSense publisher ID. The first 3 data is mandatory for ads.txt file and the 4th data TAG is optional. 

Other third party advertiser’s ad code would be like below: 


  • Infolinks.com, 1105733 , DIRECT 
  • appnexus.com, 3251, RESELLER 
  • openx.com, 118151, RESELLER, 6a698e2ec38604c6 

Here you can see domain name, Publisher ID and types of account information are available and TAG is optional so some of them don’t use them. 

How to Troubleshoot Earnings at risk Error in Adsense? 

AdSense users might have seen a red warning banner in the top of the AdSense dashboard 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 to your revenue.
If you are not aware of this issue just check your AdSense account now, because you will lose your ads revenue until fixing the issue. 

Generally this issue has evolved after introducing the “Custom ads.txt” feature in Blogger. You will find this feature inside your Blogger Dashboard under search preferences. 

Because of this new feature every AdSense publisher must insert the publisher id into Custom ads.txt option to generate revenue from the ads. 

And after creating ads.txt file or inserting data you can solve the “Earnings at risk Error” in AdSense. I will show you the ads.txt file creation and managing process in both BlogSpot and WordPress site. 

How to insert ads.txt in Blogger? 

If we don’t use ads.txt code then AdSense publisher will see a warning message in their AdSense dashboard. And by inserting the ads.txt code we can solve this issue. After inserting the AdSense publisher ID it will be verified or detected by AdSense system and later within 24 hours the red banner with warning message will be remove from your AdSense account. 

For inserting the AdSense Publisher ID in Blogger through Custom ads.txt option just go through the below steps- 

STEP #1: Go to your AdSense account and get the publisher id. For locating the publisher ID from AdSense dashboard, in the left navigation panel, 

Click Settings -> Account, then click Account information. 

You will see the publisher ID under Account information. 

STEP #2: Now sign in to your Blogger account. The sign in process requires entering your Gmail account and password. And select the Blog where you want to insert AdSense Publisher ID. 

STEP #3: just go to Search preferences under Settings as shown in the screenshot below:
AdSense Ads Are Not Shown Because of Broken Or Missing Ads.Txt

STEP #4: You will find an option to enable custom ads.txt under Monetization option. Just click Edit and then select radio button next to Yes option to enable custom ads.txt feature as shown in the screenshot below. 

Add Ads.Txt File To Blogger Blogs via Settings

STEP #5: After enabling the ads.txt feature, a text box will appear. Now insert the AdSense publisher ID like below. 
  • Google.com, pub-xxxxxxxxxxxxxxxx, DIRECT, f08c47fec0942fa0 

Don’t forget to replace xxxxxxxxxxxxxxxx by your AdSense publisher ID. ads.txt settings. You can write here maximum 10,000 characters. 

STEP #6: Once everything is done, click Save changes

After adding the publisher id into ads.txt you can check the code by navigating to your domain like this www.bloggerspice.com/ads.txt

Replace “bloggerspice” by your domain name. 

How to insert ads.txt in WordPress? 

WordPress user can easily create and manage ads.txt file by using plugins. You will find a free plugins for inserting the ad publisher ID. I will show you how to do this. 

STEP #1: First visit https://wordpress.org/plugins/ads-txt/ now you need to install and activate the Ads.txt Manager Plugins. 

Alternatively, from 

WordPress Dashboard Click the Plugins tab and Add New

Go to Search Plugins box and enter “Simple ads.txt.” 

Press Install Now and then “Activate” after the plugin has been installed. 

STEP #2: After activating the plugins in WordPress dashboard go to Setting -> Ads.txt page to configure plugin. You will see simple text area for adding publisher ID. If you are using Google AdSense then simply add the script like below by replacing xxxxxxxxxxxxxxxx with your AdSense publisher ID 
  • Google.com, pub-xxxxxxxxxxxxxxxx, DIRECT, f08c47fec0942fa0 

How do I integrate the ads.txt file using WordPress?

STEP #3: Once you have done the process then click Save Changes button. 

If you have followed my tutorial properly then earning at risk error in AdSense will be solve within 24 hours. I am pretty sure now you have learned how to create and manage ads.txt file. If you like this tutorial please share it with your social media pages. 

What's "ADS.TXT"? How To Add Ads.txt To Blogger/WordPress In 2 minutes
AdSense Ads Are Not Shown Because of Broken Or Missing Ads.Txt
Let us know what problem are your facing on adding ads.txt file in your blog and website?
Go Up