After successfully getting my adsense account approved after many trials and several rejections, I was scared when I checked my account and I saw this warning. I was asked to add “ads.txt” file to my domain root.
I definitely had to take action instantly because I was not ready to lose within a twinkle of an eye what took me so long to get. Not that AdSense will cancel my approval, but it will definitely affect my earnings. You can check this post on Google support to learn more on why the ‘ads.txt’ file is important and the implications of not having it.
Well, I was able to quickly make amends probably because of my knowledge on web development. Also, I understand the fact that not all bloggers have this knowledge, this is why you are here (winks—thanks). This is definitely why I have put this piece together to walk you through the whole process if you like adventures like this.
Fortunately, if you don’t mind installing a plugin to do this task for you, you can install “Ads.txt Manager” and follow the prompts. Part of the things you will need to complete the set up is included in this guide. Alternatively, WPBeginners has a full tutorial on it on their website.
The main reason why I try to implement the functions manually by myself is because having too many plugins may eventually affect your site speed.
You can check this post to know things you can do to improve your site speed.
Enough of the talks, let’s get down to the action.
Follow these steps to add “Ads.txt” file to your domain’s root.
First, you will head over to your control panel
In your control panel, click on “File Manager”
The “public_html” is your domain root. Click on it to open it.
Then, click on add file.
Input the name of the file. It should be named “ads.txt”. Leave other fields blank. Then click on “Create File”.
Click on the newly created file to edit it.
Incase you see this pop up, just click on edit.
If you have not copied the code yet, it is: “google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0”.
Please, know that you have to change that default pub ID to your own before that code will work.
- Where can you find yours? Login to your adsense account. Click on Account, then click on “Account Information”. There you will find your Pub ID.
Copy the ID and add it to the code here.
Finally, click on save changes.
It wasn’t that technical after all, right? If you were able to see this through, congratulations. If you got stuck somewhere, let me know in the comment section and I will rush over to help you. To check if you got it right and have truly added the file, try opening “yourdomainname.com/ads.txt” in your browser. In my case, you can check “www.seojagaban.com/ads.txt“
Oh, I forgot this part. You should probably see what your Google adsense account will look like when you have successfully done it. Here is a screenshot of my account after doing this task.
PS: You may probably have to wait for a few weeks before you see any result for what you have just done. Don’t panic!