How to fix “Google cannot access CSS and JS”

Have you received a warning from Google letting you know that Google cannot access CSS and JS files on your website.

Some of you have being experiencing some issues trying to solve an email sent by Google Search Console with the subject: Google cannot access CSS and JS files on your website.

The email is to notify you that Google Bot can’t access or crawl the CSS and JS on your website. This is due to a restriction in your robots.txt file.

To fix this issue you have to modify the robots.txt file and add the following lines:

Allow: /*.js$
Allow: /*.css$

In case you don’t have any robots.txt file, you can create one manually and add these lines:

User-agent: *
Disallow: /wp-admin/
Allow: /*.js$
Allow: /*.css$

For more information about this notification you can read the post: How To Fix Googlebot Cannot Access CSS & JS Warning

Leave a Reply

Your email address will not be published. Required fields are marked *