Googlebot cannot access CSS and JS files – No Problem

CATEGORY / CMS, Hosting, News, Support, Web, Wordpress TAGS / code, css, fix, google, guide, maintenance, seo AUTHOR / admin DATE / July 29, 2015

If you recently received a Google Search Console email saying “Googlebot cannot access CSS and JS files”, don’t worry as it’s easily fixed.

Why has Googlebot suddenly had an access issue?

In the past when search engines weren’t overly bright, the robot text file found on the server was used to stop them crawling areas of your site that would cause issues. For example double content could easily be found be viewing the same page through different web addresses. Or areas of the backend admin aren’t particularly useful if found in search engine results. So the robot text file would block them entering various areas.
As Googlebot has grown, its become a lot more WordPress wise.

Webmasters recently received : Googlebot cannot access CSS and JS files

The message from Google Search Console continues by saying “Google systems have recently detected an issue with your pages that affects how well our algorithms render and index your content. Specifically, Googlebot cannot access your JavaScript and CSS files because of restrictions in your robots.txt file. These files help Google understand that your website works properly, so blocking access to these assets can result in sub-optimal rankings”.

So the simple solution

If your site has been blocking Googlebot from accessing those files, then it’s a good thing you know about it so you can deal with the issue.

There’s an easy fix for it, which involves editing your site’s robots.txt file. If you’re comfortable editing that file, then go ahead with this fix. If you are not, then we can easily do it for you.

Simply access your server and locate your robots.txt file. Then simplify your file by removing following lines of code:

Disallow: /.js$*
Disallow: /.css$*

That’s what’s blocking Googlebot from crawling the files it needs to render your site as other users can see it.

You should now find that this resolves the issue. You can check it worked by visiting Google Webmaster tools here https://www.google.com/webmasters/tools/googlebot-fetch

Googlebot cannot access CSS and JS files - No Problem

Leave a Reply

Your email address will not be published. Required fields are marked *