This is the first step for monetizing your WordPress website using any advertising platforms like Google Adsense, Media.net, Propeller Ads, and many more here. Well, most of the blogger prefers to use google Adsense because of its popularity. Once you add the Ads.txt file to your website you will eligible to place the ads on your website.
Table of Contents
How To Create Ads.txt File
To add the ads.txt file or code on your website first you need to download the code or file from Google Adsense. There is a very simple step to do this. First login to your Adsense account and at the top, you can see a warning stated as: Earning at risk- You need to fix some ads.txt file issues to avoid severe impact to your revenue.
Or simply you can see this error in your Adsense notification and then tap on the fix now.

After this, you can see there is an option to download the ads.txt file. Simply tap on it to download the file.

Step By Step Guide To Integrate Ads.txt File
If you want to display ads on your website using any advertising methods then you must need to add the ads.txt file on your website. There are two ways to add the Ads.txt file to your WordPress website. The first one is using the plugin and the other is without using the plugin. We can see both of them one by one.
Many people prefer to use the first method which is installing the WordPress plugin because of its simplicity. While some of them prefer to use it without the plugin. You can use any of them according to your suitability.
Pro Tip: You can also read our step by step guide on How to Change WordPress Password – 2 Ways & How To Add Ads.txt File In WordPress
Integrate Ads.txt Using Plugin
The first method we are going to see is with the help of the WordPress plugin, we can insert our ads.txt file on our website in a simple way. This will take not more than a minute to insert the code and you will save your time.
The first step is to install and activate the plugin. You can also see our step-by-step guide to install a WordPress plugin.
Step 1: First of all search the plugin Ads.txt and install it. After a successful installation, you need to activate the plugin.
Step 2: Now you can see the plugin under setting on the left side, click on it to open.

Step 3: At this step, you can see a box in which you need to place your Ads.txt code. Once pasting the code click on save changes.

You can see there are 4 entities in the ads.txt file. From left to right the
Google.com, pub-0000000000000, Direct, f08xxxxxxxxxx
- The first one is the company which is putting the ads on your website.
- The second one is your publisher ID which is associated with your advertising company.
- The third field is the relationship type between you and the advertising company. Whether it is direct or indirect.
- The last entry is the ID of your advertising company.
Step 4: You will receive a popup when your code is successfully placed on your website.

Integrate Ads.txt Without Using Plugin
The second method we are going to see is without using the WordPress plugin, we can insert our ads.txt file on our website in a few steps. But for this, you need to log in to your c-Panel (Your Website Hosting Company). This will take not more than a minute to insert the code and you will save your time.
Step 1: First of all you need to log in to your c-panel.
Step 2: After that search for the file manager and open it.

Step 3: Now you need to find out this path public_html and click on it. After that, you need to upload your ads.txt file to your server.

Step 4: You need to upload the ads.txt file which you have downloaded from Google Adsense(in this case) to your server.

Step 5: Once your file is successfully placed you can see your file on your server.

How To Verify Ads.txt Is Working Or Not
It’s a great thing that we can verify whether our ads.txt file is successfully placed and working well. But how can one check whether their code is working or not? Don’t worry there is a very simple way to verify the Adsense code is working or not.
You need to enter your website URL plus ads.txt at the end of your website. You can check below with the correct format for verifying the ads.txt code is working or not.
Example: xyz.com/ads.txt

Pro Tip: You can also read our step by step guide on How To Solve Destination Folder Already Exists In WordPress & How To Add Ads.txt File In WordPress
FAQ (Frequently Asked Questions)
Why is Ads.txt file important?
Authorized Digital Sellers in short Ads is an Interactive Advertising Bureau (IAB) which helps to improve the transparency between the publisher and the advertiser who can sell or put the ads on the website. It is used to prevent fraud which is a trend nowadays. You can see the advertiser on your Ads code. There are 4 entities in the ads.txt file. From left to right the
Google.com, pub-0000000000000, Direct, f08xxxxxxxxxx
1. The first one is the company which is putting the ads on your website.
2. The second one is your publisher ID which is associated with your advertising company.
3. The third field is the relationship type between you and the advertising company. Whether it is direct or indirect.
4. The last entry is the ID of your advertising company.
How does Ads TXT work?
There are two sides, one is from the publisher’s side and the other is the advertiser side. First, the publisher needs to create an account on the advertising platform. upon successful signup, you will receive a code from the advertising platform. Now the publisher needs to place this code on their root domain. There are two ways for placing one is with the help of a plugin and the other is without using any plugin.
How do I fix Earnings at risk?
This is a common error which any blogger will face. There is no serious issue and you can solve it within a minute. But do you know why you get this type of error in your Google Adsense Account? I have listed some points below and you need to find out which is the main reason for your problem.
1. Your old Ads.txt file was deleted.
2. Maybe you have removed the plugin which you have used to place your code on your website.
3. You have updated or changed your theme so that this error will occur.
You can read the full guide above to solve the Earning At-Risk issue in Google Adsense by a simple and effective method.