Skip to main content

How to Unblock GoogleBot from CSS Files

Unblock GoogleBot
21 Aug 2015

It’s a little heart stopping when you log onto Google Search Console and you see this warning:

“GoogleBot cannot access your CSS and JS files.”

Essentially, Google needs to be able to access all CSS and JavaScript files on the website in order to analyze and evaluate how your website is working. And if your website isn’t working properly — or Google can’t see that your website is working properly — their algorithm could punish you by decreasing your rankings in the search engine.

In late July 2015, Google started sending mass warnings to users whose CSS and JS assets were blocked. If you received one of these warnings, don’t worry — you can take action before your search rankings are impacted.

What Do You Do If Your CSS and JS Files are Blocked?

You can quickly unblock GoogleBot from your CSS and JS files by adding this code to your robots.txt file:

User Agent: Googlebot
Allow: .js
Allow: .css

(Or contact us to do it for you!)

The fact of the matter is, you likely only will receive this warning if your CSS and JS files are blocked on your home page. GoogleBot does not attempt to go deep into the site, and generally crawls the home page and mobile home page in order to check for errors. In addition, it’s not going to dock you in the search rankings for blocked CSS and JS files from a third party source.

The warning might have been startling to receive, but don’t worry — the future of your business is not at stake. It’s a quick and easy fix, and then GoogleBot will get back to work crawling your site and ensuring that it’s working properly and can maintain its current ranking.