Skip to Main Content

Google Warns Googlebot Can't Access CSS & JS

Posted on 8.03.2015

Google sent out notifications through Search Console (formerly Webmaster Tools) last week notifying websites about blocking CSS and JavaScript assets.

The warning indicated that blocking those assets can lead to "suboptimal rankings" in Google as the search engine (which analyzes fully rendered pages) cannot understand a website. It is important to note for those receiving the notification, however, that this is not a penalty.

Google actually informed webmasters back in October 2014 about the harm that can come from blocking CSS and JS, but the notifications have never been seen before.

 SUBSCRIBE to Website Magazine - 12 Issues FREE

The message/notification sent by Google does provide some guidance on fixing the issue, with advice such as using the "Fetch as Google" feature to identify resources that robots.txt directives are blocking, revising robots.txt to remove those restrictions and resubmitting the file to Search Console.

Looking for a quick fix? Fortunately, getting around the problem is as easy as including the following code in your robots.txt file as Google only looks for local, embedded, blocked JS and CSS.

Here's the code for your robots.txt file if you received the warning...

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



Leave Your Comment

Login to Comment

Become a Member

Not already a part of our community?
Sign up to participate in the discussion. It's free and quick.

Sign Up


Leave a comment
    Load more comments
    New code