1

Google has been saying it can't find ads.txt for a long time, but the page is there.

ads.txt is accessible over http, https, and without a defined protocol. It is also accessible with or without www.

Google even says it has crawled the page, but somehow says it can't find it.

enter image description here

What else could be the problem here?

2
  • It can take awhile for Google to register the ads.txt. For me it was showing missing for almost a month.
    – pmagunia
    Commented Jun 17, 2023 at 16:41
  • In my case, It was because of the absence of the new line on the end of the ads.txt file. I have an article here with a more detailed explanation: dss99911.github.io/jekyll/2023/12/17/ads.txt-not-found.html Commented Dec 18, 2023 at 14:51

2 Answers 2

1

Try the official Ads.txt troubleshooter. https://support.google.com/adsense/answer/12171244

If you click on the Ads.txt troubleshooter Button, it will guide you step-by-step on how to fix your particular situation

0

I had a similar problem. Now resolved. Using Apache.

In my case, I had a Redirect permanent in the type :80 (http) virtual host, so that ALL requests for http files were served via a type :443 (https) virtual host.

I've now changed this so that requests for two specific http files (ads.txt and favicon.ico) are excluded from redirection.

I've also reinstated an actual directory for the ads.txt and favicon.ico files.

<VirtualHost xxx.xxx.xxx.xxx:80>
   ServerName example.com
   ServerAlias www.example.com
   DocumentRoot "/var/www/exampledirectory/html"
   <Directory "/var/www/exampledirectory/html">
      Require all granted
   </Directory>
   RewriteEngine on
   RewriteCond %{REQUEST_URI} !=/ads.txt
   RewriteCond %{REQUEST_URI} !=/favicon.ico
   RewriteRule (.*) https://www.example.com/$1 [R=301,L]
</VirtualHost>

I am not sure what was the root cause of my problem but I suspect that Google requested the http version and my server response was 301 and thus not a 'standard relative path', and so, quite correctly, failed the ads.txt validation.

Not the answer you're looking for? Browse other questions tagged or ask your own question.