How to add ads.txt file on WordPress and Blogspot?

add ads.txt on wordpress and blogspot
(Last Updated On: March 7, 2018)

Are you a blogger or a website owner? You might have got the notification on your AdSense dashboard warning for not implementation of the ads.txt file to their blog/website. The Ads.txt initiative was started to combat ad fraud and in particular, two main types – unauthorized reselling of your ad inventory through arbitration, and more importantly, ad fraud through misrepresentation or counterfeit ad impressions.

What is Ads.txt?

Similar to the infamous Robots.txt file, it’s a “plain text” file that is hosted on your root domain, at the top level of your website, and it contains a list of authorized sellers of your advertising inventory. It is case sensitive code so do not modify the basic structure of the code. Don’t put semicolon replacing comma or small letters for DIRECT/RESELLER tag.

ads.txt implementation

[code], pub-0000000000000000, DIRECT, f08c47fec0942fa0 [/code]

Now, Let’s break down this ads.txt file info.

The domain name of the advertising system (required to be in the ads.txt file). For Google seller accounts, the domain name is always The canonical domain name of the SSP, exchange, header wrapper, etc. system that bidders connect to. This may be the operational domain of the system, if that is different than the parent corporate domain, to facilitate WHOIS and reverse IP lookups to establish clear ownership of the delegate system. Ideally, the SSP or exchange publishes a document detailing what domain name to use.


The publisher’s account ID (required to be in the ads.txt file). The identifier associated with the seller or reseller account within the advertising system in field #1. This must contain the same value used in transactions (such as OpenRTB bid requests) in the field specified by the SSP/exchange. Typically, in OpenRTB this is the field. For OpenDirect, it is typically the publisher’s organization ID.


Type of account/relationship (required to be in the ads.txt file ). An enumeration of the type of account.

A value of ‘DIRECT’ indicates that the publisher (content owner) directly controls the account indicated in pub-0000000000000000 on the system in This tends to mean a direct business contract between the publisher and the advertising system.
Google publishers who directly control their publisher account that is pub-0000000000000000 should specify ‘DIRECT’.

A value of ‘RESELLER’ indicates that the publisher has authorized another entity to control the account indicated in field #2 and resell their ad space via the system in field #1. Other types may be added in the future. Note that this field should be treated as case-insensitive when interpreting the data.
Google publishers who do not directly control the account indicated in field #2 should specify ‘RESELLER’. For example, an Ad Exchange account using Network Partner Management should specify ‘RESELLER’ for inventory the account doesn’t directly manage.


Certification authority ID (optional). For Google seller accounts, the TAG ID is f08c47fec0942fa0. An ID that uniquely identifies the advertising system within a certification authority (this ID maps to the entity listed that is here in this case is the A current certification authority is the Trustworthy Accountability Group (TAG), and the TAG ID would be included here.

ads.txt example, 12345, DIRECT, AEC242

Where is the domain of the advertising company and 12345 is the publisher id. As a direct contract between the advertisers and publishers, it is mentioned DIRECT and AEC242 is the ad company code which is optional. Similarly,, 4536, DIRECT, 9675, RESELLER


ads.txt direct vs reseller

DIRECT is the direct contract between advertisers and publishers. Google provides DIRECT ads through AdSense Programme. Some other companies like Mediavine they buy ads from Google and act as Reseller in this case.

ads.txt WordPress

I will show you step by step process adding an ads.txt file on a WordPress blog/website.

Firstofmost we have to download and install a plugin called Ads.txt Manager. You can also install directly from the plugin directory. Activate the Plugin and go the settings.

Copy the below AdSense code and Paste it as shown below.

[code], pub-0000000000000000, DIRECT, f08c47fec0942fa0, pub-0000000000000000, RESELLER, f08c47fec0942fa0


Here I am showing you with AdSense advertisement programme. Don’t forget to replace the AdSense publisher id with your own pub id.

Ads.txt WordPress


ads.txt for Mediavine

Install Mediavine Control Panel Plugin for WordPress website and it will automatically add an ads.txt file.

ads.txt for AdThrive

Install AdThrive Plugin for WordPress websites to ad an ads.txt file.


Where to find Adsense Publisher id?

There are many ways to find the AdSense publisher id. One easy way is to log into your AdSense account and you will find the publisher id in the search bar of the browser.

Another way is to open your website in a browser and look for the source code. Click Ctrl+F and type pub- which will help you to find the AdSense publisher id.


ads.txt blogger

In blogger, it is very easy to add an ads.txt file. As Google has adopted to global advertisement policies adding ads.txt file is only a few steps away.

ads.txt adsense

Step 1: Log into your Blogspot account.

Step 2: Go to the settings >>> Search Preferences >>> Monetization >>> Edit

ads.txt blogspot

Step 3: Click on custom ads.txt content.

Step 4: Place the ads.txt file and save changes.

How will you know that ads.txt file has been updated on your blog/website?

To find it just type and find the ads.txt info.

ads.txt validator


If you are not convinced yet, there is an online tool. You can use this website ( to check whether an ads.txt file has been added or not.

Just type your blog/website URL address. Example: and this tool will give you the information about any ads.txt file added or not.





Similar Posts:

About Ankurman 199 Articles
An adventurous mind with a good knowledge of WordPress. Loves to talk about technology. He spends most of his time on his PC playing video games.

1 Comment

  1. Awesome work.Just wanted to drop a comment and say I am new to your blog and really like what I am reading.Thanks for the share

Leave a Reply

Your email address will not be published.