How to Add Ads.txt File in WordPress

5/5 - (2 votes)

Everything you need to know about how to add ads.txt file in WordPress

Are you a WordPress user looking to monetize your website with Adsense? If that’s what you’re looking for, then you have come to the appropriate spot.

What is ads.txt in Adsense (ads.txt explained)

Ads.txt allows publishers to specify which ad networks and exchanges can sell their ad inventory. This gives publishers greater control over who can sell ads on their websites and helps protect against fake inventory circulation to advertisers.

ads txt file to wp sites

How does ads.txt work?

Ads.txt files are simple text files that contain four columns of information:

domain.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0 google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

Ads.txt is a valuable tool in the fight against counterfeit inventory. Counterfeit inventory refers to ad inventory sold without the publisher’s consent, which can cause advertisers to be billed for impressions they never received. By allowing publishers to declare authorized ad networks and exchanges, ads.txt effectively prevents the circulation of counterfeit inventory.

Ads.txt gives you increased authority in determining who can sell advertisements on your website. This feature lets you selectively authorize ad networks and exchanges to handle your ad inventory.

Including your ad inventory in ads.txt increases the chances of attracting advertisers and receiving more advertiser spend. Ads.txt provides a sense of security for advertisers by verifying the legitimacy of the ad inventory and ensuring that publishers are compensated for their impressions.

How to Create an ads.txt File for Your Site

No worries if you don’t have an ads.txt file on your site! You can easily create one. Just make sure to include your publisher ID and format it correctly for the file to be verified.

To make a text (.txt) file, use a simple text editor like Notepad (Windows) or TextEdit (Mac).

Log in to your AdSense account. 

If there is an alert on your homepage, go ahead and click on Fix now. However, if there isn’t any alert, click on Sites and select the site with the Not Found ads.txt status.

Click Copy.

Please copy and paste the line into each of your ads.txt files. Your ads.txt file should now have the following entry, replacing pub-0000000000000000 with your publisher ID: 

google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

If you use a different ad network, include that network in your ads.txt file. Reach out to your ad network to get their ads.txt information.

Make sure to upload your ads.txt file to the main folder of your website. This folder is located right after the domain name (example.com/ads.txt).

To ensure that you have correctly published your file, make sure that you can view its content by accessing the ads.txt URL (https://example.com/ads.txt) in your web browser. If the file is visible, AdSense can locate it successfully.

How to Add Ads.txt on WordPress Site 

There are two ways to add ads.txt on WordPress:

1. Using a plugin

There are several plugins available that can help you to add ads.txt to your WordPress site. One popular plugin is Ads.txt Manager. This plugin lets you create and manage your ads.txt file directly from your WordPress dashboard.

To install the Ads.txt Manager plugin:

  1. Go to your WordPress dashboard and navigate to Plugins > Add New.
  2. Search for “Ads.txt Manager” and click on the Install Now button.
  3. Once the plugin is installed, click on the Activate button.

Once the plugin is activated, you will see a new menu item called Ads.txt in your WordPress dashboard. 

Click on this menu item to open the Ads.txt Manager settings page.

On the Ads.txt Manager settings page, you can enter the information for your ads.txt file. This includes the name of the ad networks and exchanges authorized to sell your ad inventory, your publisher ID, and the relationship between you and the ad networks and exchanges.

Once you have entered the information for your ads.txt file, click on the Save Changes button. The Ads.txt Manager plugin will then create and upload your ads.txt file to your website.

https://www.youtube.com/watch?v=7ZH4QBKJw08

2. Manually Without plugin

If you don’t want to use a plugin, you can manually add ads.txt to your WordPress site. To do this, you will need to create a new text file and save it as ads.txt in the root directory of your WordPress site.

The ads.txt file should contain the following information:

google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

Once you have created the ads.txt file, you can upload it to your website using a file transfer protocol (FTP) client or the file manager in your hosting control panel.

I hope this helps!