How to Create an Ads.txt File For Google Publishers

This post will teach you how to create an ads.txt file for Google Publishers.

If you have a website of your own and are using ads for monetization, you need to have a proper ads.txt file at the root level of your domain. Ads.txt, also called as Authorized Digital Seller, makes sure that your ads are sold through trusted and authorized sellers like Google Adsense.

So why should you have your own ads.txt file?

Having your own ads.txt file ensures that you have control over who is allowed to sell ads on your site stopping unreasonable advertisers to leverage your inventory.

adsense meme

It further aids in stopping fraudulent inventories to gain from something which was rightfully yours to begin with. You invariably receive more advertiser spend which might have gone otherwise to a fake inventory.

NOTE: We are only covering how to create ads.txt for Google publishers here. Those who are not using Google Publishers should contact their own SSP.

Check Whether You Have an ads.txt file

Generally, if you don’t have an ads.txt file in your domain, you get the following error message at the top bar of your Google Adsense account:

which reads nothing but:

Earnings at risk – One or more of your sites does not have an ads.txt file. Fix this now to avoid severe impact to your revenue.

Even so, it is not necessary that you get an instant notification like that because Google is very slow in these processes.

To check upfront whether you have an ads.txt file for your website or not, you have to follow the below mentioned methods:

Step 1: Login to your cPanel.

cpanel look for how to create your own website

Step 2: Enter your username and password and click on Log in button.

username and password in cpanel

Step 3: Once you are in, find File Manager, and then click it open.

click on file manager in cpanel

Step 4: Once you have opened File Manager, click on the Search box at the top right corner and type:

ads.txt

before clicking on Go.

When you click on Go button, if you get the following box:

that means there is no ads.txt file for your website.

Or if you end up with a result like this:

ads file is present in root folder

you have an ads.txt file and you needn’t worry about creating one.

What if you don’t have the ads file?

If you don’t have an ads.txt file, you can create one by following the below-mentioned steps:

Steps on How to Create an Ads.txt File

Step 1: Navigate to your root directory (It must be public_html of your website)

click on file to create a new file for ads.txt

Step 2: Create a text (.txt) file by clicking on File as shown in the image above.

rename as ads.txt

Step 3: In the dialog box that opens type “ads.txt” and ensure /public_html is being shown in the “New file will be created in” folder. Then click on Create New File.

ads.txt file located in file manager

Step 4: Right click on ads.txt file and click on Edit.

edit option on right clicking in file manager

Step 5: In the next screen click on Edit again.

click on edit button for ads.txt

Step 6: Type the following in the editor:

google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

Replace “pub-0000000000000000” with your own Publisher ID.

NOTE: Here’s where you can find your own Publisher ID in your Adsense Account. Just navigate to Account > Account information.

publisher id location for creation of ads.txt file

So now the ads.txt file should look something like this:

click on save changes button for creating ads.txt file

Step 7: Just click on the Save Changes button.

success notification after saving editor for creating an ads.txt file

Step 8: With that, a Success notification will be shown. You can then go ahead and click on close button.

That’s it!

Liked this article? You can check out more cool Google related articles on our site.

Scottshak

Poet. Author. Blogger. Screenwriter. Director. Editor. Software Engineer. Author of "Songs of a Ruin" and proud owner of four websites and two production houses. Also, one of the geekiest Test Automation Engineers based in Ahmedabad.

You may also like...

2 Responses

  1. John says:

    what is this “f08c47fec0942fa0”. will this be the same for everyone?

  2. dumbitdude says:

    Hi John,

    It is nothing but a TAG Id different for every website. f08c47fec0942fa0 is used for Google just like how 0bfd66d529a55807 is for rubiconproject. etc.

    Here’s there label in a nutshell:

    #< SSP/Exchange Domain >, < SellerAccountID >, < PaymentsType >, < TAGID >

    Cheers,
    Scottshak

Leave a Reply