When I was adding WordPress website
to my existing Google AdSense account
using the Site Kit plugin
by Google. My site ownership was verified and the Google AdSense snippet code was automatically placed on my website header section. The code is as follows. I replaced my publisher ID with the zeros.
<!-- Google AdSense snippet added by Site Kit -->
<script type="text/javascript" async="async" src="https://pagead2.
googlesyndication.com/pagead/js/adsbygoogle.js?client=
ca-pub-0000000000000000&host=ca-host-pub-0000000000000000"
crossorigin="anonymous"></script>
<!-- End Google AdSense snippet added by Site Kit -->
After that, I was asked to request for review and I got the following message We will run some checks on your site. This usually takes a few days, but in some cases, it can take 2–4 weeks. Learn more about site approvals
. Then I visited the Google Adsense Sites section where it shows my Site URL, Approval status as, and ads.txt status
as Not found
. Then I clicked on the question mark next to Ads.txt status
and it showed me the possible status and its meanings.
Check the status of your ads.txt
file:
Not found
: No ads.txt file was found when the site was last crawled.
Authorised
: Your publisher ID was found in the site’s ads.txt file.
Unauthorised
: Your publisher ID wasn’t found in the ads.txt file, and AdSense can’t show ads.
Not applicable
: Your publisher ID isn’t needed in the ads.txt file.
This makes me realize that I forgot to create a ads.txt
file on my new WordPress website root directory
. When I checked ads.txt
on the website using this URL https://mywebsitename.com/ads.txt
, I found 404 pages opened.
how to Add or place an ads.txt File in the WordPress root directory.
You can create an ads.txt file in your WordPress website root directory by following these steps.
Dashboard
.Plugins
in the WordPress menu.Add New Plugin
button at the top of the Plugins page.Filester
in the Search Plugins area at the top right corner. This will search the plugin and bring in the results ofFile Manager Pro -Filester, an advanced File Manager and code editor
.Install Now
button on thefilester
plugin.Activate
button. Yourfilester
plugin will get activated on your WordPress website, and a new menu optionFile Manager
will appear in your WordPress website dashboard menu.File Manager option
on the menu. This will open theFilester
plugin page, and in that, you will notice thepublic_html folder
in the left menu as a main option under other folders like.private
,wp-admin
,wp-content
, andwp-includes
and on the right side, you will see these folders and other files like.htaccess
,index.php
,robots.txt
, and others.TXT: Plain text
. This will create aNewFile.txt
in your root directory.NewFile.txt
toads.txt
during its creation or right-click on theNewFile.txt
and select the option Rename on the appearing dialog box.ads.txt
, Right-click on theads.txt
file and open the file in edit mode by selecting the option Edit File, and thenTextArea editor
, theads.txt
will be opened in edit mode.ads.txt
code mentioned in point 5 by visiting the Ads.txt Guide page.pub-0000000000000000
is yourpublisher ID
.google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
pub-0000000000000000
with yourpublisher ID
, Therefore to find yourpublisher ID
then go to yourAdSense account
. Click on theAccount option
on the left menu. The Account option will get expanded and you will see theSettings option
under it, click on that, and the Setting option will further expand and you will see theAccount Information option
under it. Click on that option and the first thing you will see next to the menu options is yourpublisher-ID
.ads.txt
file. Click onSave
. Now yourads.txt
file is ready and the next time when Google bot crawls your website it will find theads.txt
file on your website and will change yourads.txt
status.ads.txt
presence on your website by just adding/ads.txt
to yourwebsite URL
on thebrowser
and pressing enter. You will see the code that you added to theads.txt
file.https://mywebsitename.com/ads.txt