How to add custom ads.txt to Blogger / WordPress / Other websites?
How to add custom ads.txt to Blogger / WordPress / Other websites?
How to add custom ads.txt to Blogger / WordPress / Other websites?

How to add custom ads.txt to Blogger / WordPress / Other websites?

What is Ads.txt ?

Authorized Digital Sellers, or ads.txt is an IAB initiative that helps ensure that the digital ad inventory is only sold through sellers you identify as authorized. Creating your own ads.txt file gives you more control over who is allowed to sell ads on your website and helps prevent counterfeit inventory from being presented to advertisers. An ads.txt file can help buyers identify genuine inventory and help publisher receive more advertiser spend that otherwise might have gone toward counterfeit inventory.

In this post we shall see “How to add ads.txt to Blogger / WordPress / Other websites?”..
Create ads.txt file

The ads.txt as the name implies is a text file where the publisher should specify the source of the advertisers / sellers. It depends on the publisher which sellers/advertisers he has tied up with to display ads on his websites. A publisher may have only Google Adsense or more (Infolinks etc.). A publisher would need to refer to the advertiser’s instructions what needs to be added in the ads.txt file.

The Ads.txt includes a separate line for each authorized seller. Each line has the following fields (plus a fourth optional field):

<Field #1>, <Field #2>, <Field #3>, <Field #4>

<Field #1>: The domain name of the advertising system (required).

Example: google.com or infolinks.com

<Field #2>: The publisher’s account ID (required).

The identifier associated with the seller or reseller account within the advertising system in field. Find the publisher ID from the respective advertiser that you have association with.
<Field #3>: Type of account/relationship (required).

A value of ‘DIRECT’ indicates that the publisher (content owner) directly controls the account indicated in field #2. This tends to mean a direct business contract between the publisher and the advertising system.

If you have a Google Adsense account through which you are displaying Ads on the website, then publishers should always specify DIRECT.  ‘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. This field should be treated as case-insensitive when interpreting the data.

<Field #4>: Certification authority ID (optional).

An ID that uniquely identifies the advertising system within a certification authority (this ID maps to the entity listed in field #1). For Google seller accounts, the TAG ID is f08c47fec0942fa0.

Create ads.txt for Adsense

  • Open any text editor such as Notepad to create a text file (.txt)
  • Add the line

google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
Important: Replace pub-0000000000000000 with your own publisher ID

Where to get Google Adsense publisher ID?

Login to Google Adsense and navigate to Settings > Account > Account Information page to get the Google Adsense Publisher ID.

If you have more advertisers, then refer to their respective websites and get the details to be added to the ads.txt file.  For example: if you have an account with Infolinks.com, then login to your account on Infolinks and navigate to Ads.txt tab. The details to be included in the Ads.txt w.r.t to Infolinks are displayed in the page.

If you use both Google Adsense and Infolinks, then add the line for Google Adsense mentioned above and also append the lines that need to be added for Infolinks in the same ads.txt..

There can only be one Ads.txt for a website. 

How to add the Ads.txt file to Blogger?

The ads.txt file need to be uploaded to the root of the website. Obviously, Blogger users do not have access to the root directory. But Blogger has already implemented the Ads.txt for Blogger for Google Adsense and also provided a provision to add Custom Ads.txt.

To check the Ads.txt implementation by Blogger, go to http://yourblogname.blogspot.com/ads.txt
Verify that the publisher ID displayed is correct.

If you are using only Google Adsense in Blogger, then you do not need to add a custom Ads.txt. But if you are also using other advertising platforms, then you would need to add custom ads.txt.

To add custom ads.txt in Blogger:

  • Login to Blogger dashboard and navigate to Settings > Search Preferences
  • Scroll down to the bottom to find MONETIZATION
  • It must be DISABLED
blogger-ads-txt
  • Click on EDIT
  • Add the Google Ads.txt line as described above
  • Also add details for other advertisers here
blogger-ads-txt-list
  • SAVE CHANGES
  • To check the Ads.txt implementation on Blogger, go to http://yourblogname.blogspot.com/ads.txt and see the details

How to add the Ads.txt file to WordPress and other websites?

For WordPress sites and other websites, you would need to upload the Ads.txt file in the root directory of the website.

The easiest way to do this is to prepare the Ads.txt file on your computer and then use any FTP program to upload the file to the root directory of your website.Or you can also use your host’s control panel to upload the file using the file manager.