What to do when you get the “Googlebot Cannot Access Your JavaScript and CSS Files” warning

By July 29, 2015blog

warning

Google sent out mass warnings to users of Search Console (previously known as Webmaster Tools). Many webmasters were alerted that: “Googlebot Cannot Access Your JavaScript and CSS Files”.

This warning was issued inside of Search Console, as well as sent via email to webmasters. The email and Search Console notifications also informed webmasters that Googlebot’s inability to crawl these files might result in “suboptimal rankings”.

They make it sound very dramatic, but I am hear to bring some good news. A quick edit to your robots.txt file is like to resolve this issue for you, and get your site back to optimal rankings.

The full warning reads like this:

Google systems have recently detected an issue with your homepage that affects how well our algorithms render and index your content. Specifically, Googlebot cannot access your JavaScript and/or 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 suboptimal rankings.

googlebot cannot access css and js files on website

This is what the email notification looks like

In October of last year Google made it widely known that blocking CSS and JavaScript from being crawled would be a transgression of their Webmaster guidelines. The warnings were only issued very recently.

If you received this warning because of your site blocking robots, be happy that you were notified. You know about the issue, and you can take the necessary action to resolve it.

The easy way to fix this, is to open up your robots.txt file. (PLEASE NOTE: if you are even just a little uncomfortable working on your robots.txt file, I would suggest you call your web designer or to make these changes for you.)

Search for the below text:

Disallow: /.js$*

Disallow: /.inc$*

Disallow: /.css$*

Disallow: /.php$*

If any of these lines are present in your robots.txt, you can go ahead and completely remove them. These lines are blocking Googlebot from crawling your CSS and JavaScript.

Once you have removed these lines, head on over to Google’s Fetch and Render tool. This tool will confirm whether Googlebot can now crawl your site without hindrance. If there is something else blocking Googlebot, the utility will advise you of the required steps to be taken.

If all of this sounds G(r)eek to you, give me a call on 076 640 6339 or drop me an email here and I would gladly assist you in fixing this crawl error.

About Eben

I love spending time with my wife and two small boys, don't mind lighting up the braai 3 times a week, and enjoy watching sports. I am passionate about helping small businesses, especially with the use of the internet and technology. Send me an email on the Contact page, I would love to hear from you.

Leave a Reply