Analytics
2.2K members online now
Understand information in your reports and troubleshoot reporting issues such as self-referrals, (not set) data, and inaccurate information
 
Guide Me
star_border
Reply

Googlebot cannot access CSS and JS files

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

That is what I get in Google Analytics.  However, when I run through the robots.txt tester everything is fine. So why do I keep getting this error?

Googlebot cannot access CSS and JS files

[ Edited ]
Explorer ✭ ✭ ☆
# 2
Explorer ✭ ✭ ☆

What is the content of your robots.txt? The robots.txt file can be formatted correctly, but might still block Googlebot from reading CSS and JS files.

Googlebot cannot access CSS and JS files

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Phillip,  I am embarrassed to say that I cannot find it and am communicating with the developer who made it for us.  I do not understand how Google can test it if it was not there and this is what Google found:

User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php

 

Thank you for your response.

Marked as Best Answer.
Solution
Accepted by topic author Brian L
November 2016

Googlebot cannot access CSS and JS files

Explorer ✭ ✭ ☆
# 4
Explorer ✭ ✭ ☆

The robots.txt file is usually located in the root of the domain. So if you're domain is example.com, you can just enter example.com/robots.txt in the browser's address bar.

 

WordPress usually disallows the theme directory where all css and js files for your theme is located. So often times it'll help to remove that. But what you're printing in your reply should not affect Google's ability to crawl css/js files (apart from those located in the wp-admin directory which is OK.