Are you looking to add an Ads.txt file in WordPress? Don’t worry; here in this guide, I am going to tell you how you can create and upload an Ads.txt file to your WordPress blog.
Google AdSense is one of the best ways to earn money from your website. It shows different ads on your website, and when someone clicks on them, you will generate money in your AdSense account.
In the past few months, Google has been cracking down on publishers for not having ads.txt files on their sites. If you want to avoid some serious problems, including your Google AdSense account being disabled, you should create an ads.txt file for your WordPress blog.
In this guide, you will learn how to create and upload an Ads.txt file in WordPress.
Let’s start the guide!
What is An Ads.txt File?
A Google AdSense Ads.txt file is a text file that contains a list of authorized digital sellers for a specific domain. This file allows Google to verify that the publishers running ads on a website are authorized to do so.
The file must be placed on the root domain of the website (e.g. www.example.com/ads.txt). The Ads.txt file format is simple and consists of one line per authorized seller. Each line must include the seller’s account ID and domain.
Publishers can generate their Ads.txt file using the Google AdSense interface. Once generated, they should upload the file to their website’s root directory. Google will then periodically check the file to ensure that the publisher’s list of authorized sellers is up-to-date.
Importance of Ads.txt File
There are multiple benefits of adding an Ads.txt file to your WordPress blog. In fact, almost every Google AdSense account holder uploads this file to their websites. Here is why to add an Ads.txt file:
- This file is used to help Google verify that the ads on a website are coming from authorized sources.
- Ads.txt file helps to improve the quality of the ads that are displayed on a website.
- The file can help to protect the website from fraud. This is because the file can help to ensure that the ads are coming from legitimate sources.
- You must add an Ads.txt file to your blog because without doing this, ads will not be shown on your website.
- Ads.txt files are a great way for publishers to improve transparency in online advertising. By declaring who is able to sell their ad inventory, publishers can be sure that their ads are being sold by reputable sources.
How to Create an Ads.txt File in WordPress
Creating an Ads.txt file in WordPress is pretty simple and doesn’t need any special knowledge. Below, I have provided detailed steps.
To create your Ads.txt file, you have to log in to your AdSense account by visiting here.
The next step is to download your Ads.txt file. Once you log in to the AdSense dashboard, you will see a notice at the top bar with the name “Earning at risk”. Here, simply click on the “Fix now > Download” button, as shown in the above image.
How to Add/Upload Ads.txt File in WordPress With Plugin
The easiest method to add an Ads.txt file in WordPress is to use a plugin. You can find tons of plugins on WordPress to fix the Ads.txt files issue. However, I highly recommend and also personally use the Ads.txt Manager plugin.
This plugin helps you create, manage, and validate your Ads.txt file. It is also used by over a lakh webmasters to declare and validate their Ads.txt file.
The first step is to install and activate the plugin by navigating to “Plugins > Add New” and searching for “Ads.txt Manager” as shown in the above image.
Next, go to “Settings > Ads.txt”. Here, you can configure the plugin settings. As you can see in the above image, you have a white box where you can declare all your ad platforms. In our case, we have to add the AdSense code to declare it.
Here is the line of code that you have to enter:
Keep a note that you have to replace “pub-0000000000000000” with your Google AdSense publisher ID.
Here is the breakdown of the code line:
- google.com – the domain address of your website; replace it with your own domain.
- pub-0000000000000000 – AdSense publisher ID.
- DIRECT – relationship type of publisher (it can be either DIRECT or RESELLER).
- f08c47fec0942fa0 – represents an ID of the advertising platform.
How to Add/Upload Ads.txt File in WordPress Without Plugin
In this method, I will show you how you can add an Ads.txt file in WordPress without using any plugin. This method is going to be a manual method where you need your site’s cPanel access.
In this method, you have to upload your Ads.txt file to the website’s root directory. To do it, login to your cPanel and open “File Manager” available under “Files” as shown in the above image.
Next, open the “public_html” folder and create a new file with the name Ads.txt. In this file, you have to add the same line of code as we did in the first method above.
Now, to see if the process is successfully completed or not, add “ads.txt” at the end of your domain like this: “www.domain.com/ads.txt”. If you see the same code that you added to the file then it means you have successfully added the Ads.txt file to your WordPress blog (refer to the above image).
The ads.txt file is an important file to have on your WordPress blog. Adding it to your site is not rocket science, you just have to follow a few simple steps.
Thank you for reading our blog on how to add a Google AdSense ads.txt file to a WordPress blog. I hope this blog post has been helpful! Still, if you have any queries, feel free to comment below.
1 thought on “How to Add Ads.txt File in WordPress (2 Simple Steps)”
I wanted to take a moment to express my gratitude for your helpful article on “How to Add Ads.txt File in WordPress (2 Simple Steps)”. As someone who is relatively new to managing a website, I found your step-by-step instructions to be clear, concise, and easy to follow. Your article provided me with the guidance I needed to add an ads.txt file to my WordPress site without any confusion or frustration.
I appreciate the time and effort you put into creating this article and sharing your knowledge with others. Your contribution has been incredibly valuable to me, and I’m sure it will be to many others who come across it as well.
Once again, thank you for your excellent work, and please keep sharing your expertise with the world.