Do you want to add an ads.txt file to your WordPress website? In this article, you will learn how to add an ads.txt file in WordPress with & without plugins. I have covered a lot about ads.txt files in this guide. You will find all the answers to your questions in this comprehensive guide.
So, let’s get started.
Things that you’re going to learn in this article.
- What is Ads.txt file?
- What Ads.txt file does?
- How to Add ads.txt File in WordPress without Plugin
- How to Add ads.txt file in WordPress with Plugin
- Lastly, How to Check if ads.txt file Exists or not
First of all, let’s have a quick introduction to the ads.txt file.
What is Ads.txt file?
In simple words, ads.txt is a file that protects publishers and distributors from ad fraud. It allows website owners to declare who can sell ads on their website.
Ads.txt stands for Authorized Digital Sellers. It is an initiative from IAB Technology Lab. It is basically a text file that does the whole job. What we need is a simple text file that we use in WordPress.
What Ads.txt file does?
First and foremost, the most important thing that it does is that it authorizes the advertisers to sell their ads. Also, it prevents ad fraud. When someone has an ads.txt file on their website that means they are secure from ad frauds. Also, it increases ad revenue.
It is not mandatory but it is highly recommended for any publisher.
Now, let’s see how we can add an ads.txt file in WordPress.
How to add Ads.txt file in WordPress without Plugin
We can add an ads.txt file to WordPress without any plugins using the FTP client. All you have to do is just upload your ads.txt file to the root directory of your WordPress.
You can do it in 3 simple steps.
1. Download and Save Ads txt file on Your PC
If you’re using Google Adsense then you can download Adsense ads.txt file from your Adsense account. Or if you’re using another ad network like Infolinks etc then you can get it from there. It will be a simple text file with a .txt file extension.
After that go to the next step.
2. Download and Install FileZilla Client on Your Computer
FileZilla is a free File Transfer app to transfer files between web servers and computers.
You can download FileZilla Client from their official website. With the help of Filezilla, we’ll upload the ads.txt file to the root directory of our WordPress website.
After downloading and installation of FileZilla is completed, see the next step.
3. Upload ads.txt file to the Root Directory of your WordPress Site
To do this, open the FileZilla app on your computer. Then, enter your FTP Host, Username, Password, and Port as shown in the image below.
You can find your FTP details in your hosting account. Every hosting company has its own hosting panel or dashboard with different features. You can find FTP details in the FTP and files section. And make sure the SSH or SFTP option is turned on only if available in your hosting.
Just copy the FTP details like host, username, password, and port from your hosting dashboard. And paste these details in FileZilla as shown in the above image. Then, click on the Quickconnect button.
It will take a minute to connect you to your web server. Where you will upload the file.
Here see there are two sides right and left as shown in the image below. On the right of FileZilla, your server files are listed. And on the left side, your computer files.
You can upload any file to your server from your computer here. And also you can download files from your webserver to your computer.
After connecting, go to the folder where you download your ads.txt file. And right-click on the ads.txt file and then click on upload. It will automatically be uploaded to your root directory. Just follow the steps as shown in the images.
After uploading complete, check to confirm it is uploaded correctly. After that close the FileZilla. All Done!
Now let’s see, how we can add an ads.txt file in WordPress using the plugin.
How to Add ads.txt file in WordPress with Plugin
After installing the plugin, click on activate to activate the plugin as shown below.
After activating the plugin, open the plugin settings. You will see a blank text box. Where you can paste your Google Adsense ads.txt line. As shown in the image below.
Replace your AdSense publisher id with your own, pub-0000000000000000. Don’t forget to save.
Now you have successfully added ads.txt in WordPress.
Lastly, let’s check your ads.txt file is added correctly or not.
How to Check Ads.txt file Exists or not
To do this, just type yourdomainname.com/ads.txt in your browser to access your ads.txt file. Remember, you can’t access it through your subdomain. So, don’t use your subdomain.
That’s it! Hope this article will be helpful for you.
Also, read this article on how to add web push notifications to WordPress websites to increase traffic.
Any questions related to this guide? Feel free to ask in the comment section below. And don’t forget to share.