How To Add “ads.Txt” File In cPanel or WordPress Website: Simple Steps

Here is a comprehensive guide on how to add ads.txt files in cPanel or WordPress websites. 

Ads.txt is a file that contains the ad codes and ad elements for a website. Without it, ads can not be served on your website. 

Hence it is very important for you to add it to your website if you are monetizing your website with display ads such as Adsense.

So, this page has everything on how to create an ads.txt file both for WordPress and cPanel. Read on.  

What is Ads.txt file?

Ads.txt file is that file that saves all the configuration of ads elements. 

Ads network or ad exchanges such as Google Adsense use Ads.txt file to ascertain the publisher earnings, the kind of ads that will display on the site etc. 

Ads.txt file usually contains your publisher ID, the company that’s serving the ads, their domain name and  lastly the relationship type (DIRECT or RESELLER). 

Why Do You Need Ads.txt On A Website?

Ads. txt helps advertisers verify the sellers and, ultimately, prevent spending money on counterfeit inventory. In turn, publishers receive their share of ad spend that would have otherwise gone to ad fraud.

Ads.txt was primarily created by International Advertising Bureau Tech Lab in 2017 to reduce fraud, improve security and maximise revenue of ads displayed on websites. 

Ad.txt is used by Ad agencies to manage how ads are displayed on publishers’ websites, while also authenticating any action taken on those ads. This would ensure that publishers and advertisers are getting the best returns from working with the ads network. 

Let’s explain…

Ad exchanges connect publishers and advertisers together. 

These two parties are looking to take profit off the partnership. 

Advertisers are paying for ads and getting more customers, while the publishers are selling spaces on websites while earning per click, views or impression. 

Then, there is the middle man, Ad exchange or network. 

Firstly, publishers can be defrauded by an advertiser or even the ad exchange if there are no ads.txt files. 

This is because you would not be able to access a transparent earning dashboard. 

On the other hand, advertisers can be duped too. 

Publishers can trick ad platforms into fake clicks, fake impressions, domain spoofing, fake views etc. 

In turn advertisers would pay more money on running laid ads without getting tangible customers in return. 

Yet, since it is the duty of ad agencies to protect both parties, the best they can put together is an ads.txt file which would improve transparency. 

How To Add Ads.Txt Using A Plugin On WordPress (Ads.Txt WordPress)

If your website is built on WordPress,  you can easily use a plugin to set up ads.txt. 

With this, it is far easier than going to cPanel to create a certain ads file. 

Before we proceed, make sure you have downloaded or saved your ads.txt file first from your ads exchange dashboard. 

Here are steps:

1.      Login to your WordPress dashboard. 

2. Click on Plugin > Add new plugin.

3. In the search bar input “ads.txt manager.” This plugin is used for creating and adding ads.txt files to your website. 

Install ads.txt manager

4. Many results will be displayed but I prefer you choose the one in the image below. Tap on install and Activate.

Creating Ads.txt file

5. On the admin panel, tap on Settings > Ads.txt

6.  Go to the ads.txt file you saved to your device earlier and copy out the code in it.  

For google adsense, it is always like this: [ht_message mstyle=”info” title=”” show_icon=”” id=”” class=”” style=”” ], pub-0000000000000000, DIRECT, f08c47fec0942fa0[/ht_message]

Only that the publisher ID would be different – pub-***************.

Also, the ads.txt file might be different from this if you are not using Google adsense. 

7. After that go back to the ads.txt page. It would definitely show a black sheet. Paste the code you copied from the ads.txt field. 

Adding the ads.txt file to the ad manger plugin

8. Finally, click on the Save Changes button. Your ads.txt file has been added to your WordPress website. 

How about adding to cPanel? 

How To Add Ads.Txt To WordPress Via Cpanel

The CPanel is the engine house of every website. It contains all your website files. 

To add add.txt to cPanel, follow these steps:

1.    Login to your cpanel account from your web hosting dashboard. 

2. Go to File Manager

Go to your CPANEL and Open File Manager

3. Select web root (public_html/www) from the drop down menu. 

Tap on public html and create a new ads.txt file under it

4. Now, tap on the create new file icon, +.   

5. Name the file ads.txt. 

6. Paste in the code in the ads.txt file:, pub-0000000000000000, DIRECT, f08c47fec0942fa0. 

7. Tap on Save. Gee! You just created your Ads.txt via Cpanel. 

How to Check If Ads.txt Has Been Configured?

After completing any of the methods, type in 

It would display a result showing everything in your ads.txt. 

However, if it has not been configured yet, it would show a 404 error. 

Is it this simple?  

Absolutely simple to add ads.txt to your WordPress website via an ads.txt manager plugin or CPanel. 

You can share this page because there might be another Samaritan looking to solve this problem real quick. 

Sodeeq Olaitan is a passionate blogger, and internet marketer.

Write A Comment