What we did when Google sent us a note saying Googlebot cannot access CSS and JS files

Peter A. Liefer II | Posted: August 17th, 2015 | Updated: May 23rd, 2024

What we did when Google sent us a note saying Googlebot cannot access CSS and JS files

A few days ago, we received an email from Google saying that Googlebot was unable to access CSS and JS files on some of our client’s websites. Of course it caught our attention, Google noted that this issue can result in suboptimal rankings!

via GIPHY

So, what did we do? We simply followed Google’s instructions.

First, you need to identify the blocked resources.

To do this, you must log into your Google Webmaster Dashboard and use the “Fetch as Google” tool under Crawl and Fetch and Render your URL..

googlebot cannot access CSS and JS files 4After a few minutes, you will be able to access the results page that will show you a list of blocked resources.

After identifying the blocked resources, you should unblock them in your robots.txt

We found out that the blocked resources in our client’s site are located in the following folders :

/wp-content/
/wp-includes/
/fonts/

Take note that there are many ways to do this. In our client’s case, we unblocked the resources by removing the restrictions in their robots.txt. This is how their robots.txt looks now :

User-agent : *
Disallow: /wp-admin/

If you are using a CDN like we do, you’re going to have to use a custom robots.txt set up to unblock the resources from your CDN.

Login to your MaxCDN account
Click on Manage beside your site’s URL then choose SEO

googlebot cannot access CSS and JS files 2

Click on all check boxes and enter your custom robots.txt

googlebot cannot access CSS and JS files 2

The final step is to check if the resources are now unblocked. To do this, just repeat the first step.

If your result still comes back as “Partial”, you may be using blocked resources from other sites.

Don’t worry, Google won’t penalize you because those resources are no longer in the webmaster’s hands.

Read more articles like this: , , ,

    Let's Talk about your business

    I allow this site to gather my info for contact via call, email, and text. To opt out, request data deletion through our Help Center Form. This form collects your information so that we can correspond with you. Please check our Privacy Policy and Terms and Conditions.


      Get a Free SEO site audit

      What Onpage SEO issues keep your website from ranking better on Search Engines such as Google? Identify them with our Free SEO Site Audit Report!

      To opt out, request data deletion through our Help Center Form.

      This form collects your information so that we can correspond with you. Please check our Privacy Policy and Terms and Conditions.