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?
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).
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.
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.
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.
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.
You will possibly see that your website online has disallowed access to some WordPress directories like this:
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.
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.