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.”
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
(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.