How to Fix “Googlebot cannot access CSS and JS files” Error in WordPress

Are you seeing ‘Googlebot cannot access CSS and JS recordsdata’ caution in Google webmaster gear account on your WordPress website online? The message comprises hyperlinks to directions on how to repair this factor, however the ones directions don’t seem to be really easy to practice. In this text, we will be able to display you ways to repair “Googlebot cannot access CSS and JS recordsdata” error to your WordPress website online.

Why Google Needs Access to CSS and JS Files?

Google is fascinated by giving higher ratings to consumer pleasant web pages – websites which are rapid, have just right consumer enjoy, and many others. In order to decide the consumer enjoy of a site, Google wishes access to be ready to discuss with the website online’s CSS and JavaScript recordsdata.

By default WordPress does now not block seek bots from gaining access to any CSS or JS recordsdata. However some website online house owners would possibly by chance block them whilst attempting to upload additional safety features or by means of the usage of a WordPress safety plugin.

This restricts Googlebot from indexing CSS and JS recordsdata which would possibly have an effect on your website online’s search engine optimization efficiency.

Having mentioned that, let’s see how we will be able to find those recordsdata and unblock them.

How to Give Google Access to Your CSS and JS Files

First you want to know which recordsdata Google is not able to access to your site.

You can see how Googlebot sees your site by means of clicking on Crawl » Fetch as Google in Google Search Console (previously Webmaster Tools). Next, click on on fetch and render button (you wish to have to do that for each Desktop and Mobile).

Fetch and render a page as Googlebot

Once fetched, the outcome will seem in a row underneath. Clicking on it’s going to display you what a consumer sees and what the Googlebot sees when it lots your website online.

Fetch as Google Comparison

If you understand any distinction between the 2 screenshots, then which means that Googlebot was once now not ready to access CSS/JS recordsdata. It may also display you the hyperlinks of CSS and JS recordsdata it was once not able to access.

You too can discover a listing of those blocked assets below Google Index » Blocked Resources.

Finding blocked resources in Google Search Console

Clicking on each and every useful resource will display you the hyperlinks to precise assets that cannot be accessed by means of Googlebot.

Most of the time, those are CSS kinds and JS recordsdata added by means of your WordPress plugins or theme.

Now you’ll want to edit your website online’s robots.txt report which is what controls what Google bot sees.

You can edit it by means of connecting to your website online the usage of an FTP consumer. The robots.txt report will probably be in your website online’s root listing.

Locating robots.txt file on a WordPress site using FTP client

If you might be the usage of Yoast search engine optimization plugin, then you’ll edit robots.txt report from inside your WordPress admin space. Simply pass to search engine optimization » Tools web page and then click on on File Editor.

Editing robots.txt file using file editor tool in Yoast SEO

You will possibly see that your website online has disallowed access to some WordPress directories like this:

User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/
Disallow: /wp-content/plugins/
Disallow: /wp-content/issues/

Now you want to take away the strains which are blockading Google’s access to CSS or JS recordsdata to your website online’s front-end. Typically those recordsdata are situated in the plugins or issues folders. You may additionally want to take away wp-includes, many WordPress issues and plugins would possibly name scripts situated in wp-includes folder, corresponding to jQuery.

Some customers would possibly understand that their robots.txt report is both empty or does now not even exist. If Googlebot does now not discover a robots.txt report, then it routinely crawls and index all recordsdata.

Then why are you seeing this caution?

On uncommon events, some WordPress web hosting suppliers would possibly proactively block access to default WordPress folders for bots. You can override this in robots.txt by means of permitting access to blocked folders.

User-agent: *
Allow: /wp-includes/js/

Once you might be performed, save your robots.txt report. Visit the fetch as Google software, and click on on fetch and render button. Now examine your fetch effects, and you’ll see that the majority blocked assets factor must disappear now.

We hope this text helped you get to the bottom of ‘Googlebot cannot access CSS and JS recordsdata’ recordsdata error to your WordPress website online. You may additionally need to see our information on

If you loved this text, then please subscribe to our YouTube Channel for WordPress video tutorials. You too can in finding us on Twitter and Facebook.

Recent Articles

The Essay Writing Service that is Right For You If you are unsure of how to begin your writing career as college students...

How to Write Research Papers: Finding Professional Staff

In order to construct a research team, the community college or university can supply you with professional staff who can help you execute the...

Essay Assist – Happens Before You Write Your Essay

It can be easy to give in to your urge to write an essay. You can have a well-researched thesis you would like to...

Totally free Slots No Download Zero free spins keep winnings no deposit Registration To have Instantaneous Play

PostsGambling enterprise Greeting Bonus100 % free Slots No Install Zero SubscriptionElectronic pokerTrial Ports Fun The online game provides a keen RTP part of 92.13% and...

Is there a way to stop Windows Script Errors from popping up? : windows

Click on Apply this fix in the dialog to proceed. Press Windows key + I to open up the Settings menu on Windows...

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here