How to Add Ads txt file in WordPress?

Detail guide on how to create and add ads.txt file in WordPress for Google Adsense.

So, your blog has been accepted to serve Google Ads. Congratulation.

But suddenly this notification appear in your Google Adsense dashboard:

Earnings at risk – You need to fix some ads.txt file issues to avoid severe impact to your revenue.

How to fix it?

How to add ads txt file in your site?

In this post, we’ll guide you throughout the whole process.

Easy and no plugin needed.

Lets get started.

But first, some bonus for those who like to know more.

(or just skip to how to add txt file section)

What is this thing called ‘ads.txt’?

The ads.txt file is just a txt file with some infomation in it.

It can be simple as this:

simple ads txt file
Simple ads txt file

or can be overly long as this:

long ads txt file
Overly long ads txt file.

This thing was created and introduced by IAB Lab in 2017.

It was created to ensure all of ads in your site is only being sold through an authorized sellers (in this case, Google Adsense).

In short, if we create and put an ads.txt in our site, only the seller listed in the ads.txt file can sell ads in our site.

When Google said, ‘to avoid severe impact to your revenue’, they are not threathening you to follow the recent initiative.

It is because, if you don’t have the ads.txt file, your site might be removed from advertisers’ target media list and you might miss the big bucks here.

In addition to that, it can also reduce the probability of ad fraud things like domain theft or alleged domain hijacking.

So if you dont have one better to create now.

How to add ads txt file step by step

Only 2 things required:

  1. Time to read and follow all steps in this post, and;
  2. Access to cPanel for uploading the ads.txt file

We’ll do it from the very start.

1 Access your Google Adsense account

Login to your Google Adsense Account.

On the dashboard or ‘Home’, at the very top, where the notification ‘Earning at risk’ appear, click on the ‘Fix now‘ option.

fix now option google adsense

If the notification is no longer there, you can also access it by clicking the ‘bell icon’ next to your profile picture located at the very top right of the display.

2 Create the ads.txt file

Clicking on the ‘fix now’ option will bring you to the detail window of which site the ads.txt file should be created for.

Details about the ads.txt file that require action.
Details about the ads.txt file that require action.

Here you have 2 option:

  • You can click on the ‘see the ads.txt guide’ for more details or;
  • Just click on the ‘DOWNLOAD’ button and continue with this guide.

Anyway, just click the ‘Download’ button for now.

It will download the ‘ads.txt’ file Google made for you. You can use it as it is, unless you’re using some other advertisement network such as Ezoic.

Now that you have your ads.txt file we can proceed to the next step.

3 Upload the Ads.txt file to your site

The next step is, you need to upload the ads.txt file to the root directory your site.

For this, you will need access to your hosting server.

Most common method to to access or manage the hosting server is by using the cPanel.

To access your site cPanel:

  • If you have your cPanel login detail just type in your site url (in browser) with additional ‘/cpanel‘ at the end of it, just like this ‘‘. Or;
  • Access cPanel through your hosting account. There should a a link somewhere in your hosting account leading access to the cPanel.

For example, I’m using hosting service from Namecheap. I can access the cPanel from the link available under the ‘hosting list menu’:

access to cpanel form hosting account
Access to cPanel form hosting account.

If you’re using service from another place you should be also able to find the cPanel somewhere inside your hosting account.

Inside the cPanel (dashboard) look like this:

cPanel dashboard
cPanel dashboard.

Scroll down to find the ‘FILES‘ section.

Under the FILES section, click on the ‘File Manager‘.

file manager in cPanel
File manager icon in cPanel.

The File Manager view will appear just like this:

file manager view in cpanel
Vile manager view in cPanel.

Here in File manager you can do things just like normal file manager do – upload, download, rename, delete or even edit the file.

We need to upload the ‘ads.txt’ file to the root directory of the site.

At the left side of the file manager view, there is a folder tree:

folder tree in the file manager view
Folder tree in the file manager view.

Among the folder, there is one folder named ‘public_html’.

This is where all of your site file stored.

So, the ‘ads.txt’ file should be uploaded into this folder.

Proceed to select and click on the ‘public_html’ folder.

The contain of the folder will be revealed in the right view panel.

If you can see things like assets, cgi-bin, wp-admin, wp-content and etc (for wordpress platform), you’re clicking on the right folder.

public_html folder
public_html folder.

Next, click on the ‘Upload‘ menu located at the top of the file manager view.

upload menu in file manager
Upload menu in file manager.

A new tab will be open for you to select and upload your ‘ads.txt’ file.

select and upload file in File Manager cPanel
Select and upload file in File Manager cPanel.

Proceed to select your ‘ads.txt’ file that has been downloaded earlier from Google Adsense.

After selecting it, it will be uploaded automatically to your site hosting server inside the ‘public_html’ folder.

The uploading process complete when you see 100% status on the screen.

File uploading process complete
File uploading process complete.

And with that, you have successfully add the ads txt file to your site.

4 Visit the Ads.txt to confirm

Before you close all the windows, you need to do last final test to ensure your ads.txt file has been uploaded properly and can be accessed by Google.

To do that you can open a new tab on your browser.

(I suggest that you open a new tab using an incognito mode, or using another browser or maybe using another device to make sure the file can be accessed properly)

Then, type in your site url and add ‘/ads.txt‘ at the end of your site url. Ex: ‘‘.

If the file can be viewed from your browser then your site is good to go.

And that’s the end of how to add ads txt file for Google Adsense.

The warning notification on your Google Adsense dashboard will disappear later after the Google Bot revisit and confirm the existence of Ads.txt file in your site.

If that’s help, we would like to received your thanks by sharing it.

Leave a Reply