Engage Web logo - horizontal-resized


system fail 1236802

Google Console’s warning about blocked CSS and JavaScript files – what should I do?

system fail 1236802

Google Console’s warning about blocked CSS and JavaScript files – what should I do?

If you’re a regular user of Google Console (formerly Google Webmaster Tools), you may have received this warning for one of your websites, as Google has just started sending these out:

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


This sounds pretty serious and, at first glance, may worry some website owners. If Google can’t access something and your rankings could be ‘suboptimal’, then that’s bad, right?

Well, don’t worry, there’s no need for panic. This is a very simple fix and is usually caused by a line or two in your robots.txt file. Have a look at your robots.txt file and see if it includes one of these:

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

For WordPress sites specifically, it might include:

Disallow: /wp-content/
Disallow: /wp-content/themes
Disallow: /wp-content/plugins

If any of these lines are present, remove them. They’re basically telling Google it can’t access files with the extensions .css or .js and, for WordPress, it’s saying Google can’t look in the folder /wp-content/ or the themes and plugins folders.

You can test if your work has been successful by going to Google’s ‘Fetch as Google’ tool in Google Console, selecting your website property (if you have more than one) and clicking the ‘Fetch and Render’ button.

This will take a few moments before it is ready. Once it has been completed, click on the button with the green tick to see the results. If it has worked, you should see your website ‘as Google sees it’ displayed pretty much the same as how users will see it (with the CSS and JavaScript displaying correctly).

You can also check the results in the robots.txt Tester in Google Search Console to ensure your edits have been crawled by Google.

Darren Jamieson

Get in touch

    Please confirm we can contact you


    Book a consultation with Engage Web

    Book a consultation with Engage Web

    Sorry to interrupt, but would you like to download our FREE Social Media Calendars?

    Social Media Calendar Product Mock Up for web

     You can use them to plan your social media and content in advance, saving you time and getting better results. When you use our social media calendars, you'll always know what's trending and what to post about for your business.