Recently, a lot of AdSense publishers are complaining about something called ‘ads.txt’. Is Google asking you to add an ads.txt file to your website? Adding Adense’s ads.txt is very easy. It’s one of Google Adsense’s addons which you need to add in order to save your revenue from getting disrupted.

According to them, they’re getting a message on their Adsense account which states that they have to add an “ads.txt” file in order to save their earnings. Yesterday in the evening, I got the same message too.

Below I have explained what is ads.txt and how can you add to your website. It’s a very easy and simple process. 


Authorized Digital Sellers or is an IAB initiative that helps ensure that your digital ad inventory is only sold through sellers (such as AdSense) who you’ve identified as authorized. Creating your own ads.txt file gives you more control over who’s allowed to sell ads on your site and helps prevent counterfeit inventory from being presented to advertisers.

In layman’s term, it basically allows you to control which advertiser can show your ads on your website. 

This file is not just for you but it also helps the advertisers in a way. Basically, it’s a proof of authenticity that the website using the ads is legit and it the one registered on the ad company’s website.

This is done because many publishers can insert the text of their ads on other websites which are not approved by the ad company. This is illegal and it shouldn’t be done, 

Not just Adsense, but other big Ad companies like Vertoz, and Infolinks etc use it.

How to add ads.txt to your website?

Adding this file is very easy and below I have provided a stepwise guide so that you could understand it and implement it properly.

You’ll need

  • Access to your file manager
  • A few lines of code which are given below


  • Step 1

You can need to go your file manager and open the directory in which your website is installed. For most of the people, it’s “PUBLIC_HTML”

In my case, it’s public_html. Yours can be different. But in most cases, it’s either public_html or htdocs.

  • STEP 2

 The second step is pretty easy as well. All you have to do is, create a “NEW FILE”.

Inside your website directory, if you’re using file manager, you will find an option to add a new file somewhere on the screen. If you don’t, just try clicking Right Mouse Button (Right Click) and select a New File Option

Very easy till now right?

Now let’s go to the next step

  • STEP 3

Now you have created your file, wondering what to do next? 

The post’s title says it all. Now, you need to rename that file. In our case, we need to rename it to “ads.txt

You will get an option to rename the file as soon as you create it.

Even if you don’t get an option, then don’t worry. Just right-click on that newly created file and click on “Rename” 

Press “OK” and save it.

  • Step 4

Now, here comes the tricky part. 

Now you are gonna have to edit the file as you’re going to add some lines inside it.

If your file is already open then it’s fine, but if it’s not then just go to your file, press the right mouse button while pointing the cursor on it and click on “EDIT”

After you press edit, you will see an empty file. Just add these lines inside it., pub-0000000000000000, DIRECT, f08c47fec0942fa0

Important: Make sure you replace pub-0000000000000000 with your own publisher ID.
Like, in my case it’s something like this
Now, just save the file.

To check if your file is working properly or not, just Host your ads.txt file at the root level of your domain. (for example,

If it’s showing you the information correctly, then you’re good to go!

NOTE: In case of FTP, use Filezilla to open the directory and right click on the website directory and create a new file. 

After creating the new file, all you have to do is edit and rename it in the manner I have shown above and save it.

Below is the link to Google’s support page regarding the same matter:

2 Replies to “Did Google ask you to add “ads.txt” to your website? It happened with me too… This is how I fixed it!

Leave a Reply