Many users of Google Search Console formerly Google Webmaster Tools got an e-mail, was in the problems in the detection indicated by the Googlebot.What this is all about and how to fix these problems, I explain below.
CSS, JS and Googlebot
The reason for this lies in the analysis of the sites. Googlebot analyzed now not only dry code, but as the site actually looks. That’s interesting, and just for the mobile view.
WordPress Folder Lock?
But why should we block them at all. The reason lies in the improvement of the safety of a WordPress site. The blocking of CSS and JS files was there more collateral damage.
For a long time it was recommended certain subdirectories not release in WordPress for indexing. This is done above all, to find out it’s not so easy to make attackers eg which plugins are used.
But if you, for example, the subdirectories “wp-includes” and “wp-content / plugins” blocks for the Googlebot, it can not be read also important CSS and JS files.
Now Google has thus sent to all website owners mails withheld important files Googlebot. And if you do not resolve this issue, there might be disadvantages in the Google search results.
One solution would be to remove the blocked subdirectories again from the robots.txt file. But that’s not necessarily the best solution.
Instead, you can continue this block. For example,
User-agent: * Disallow: / wp-admin / Disallow: / wp-includes / Disallow: / wp-content / plugins / Disallow: / wp-content / themes / ...
But in addition you should give the Googlebot permission to access the CSS and JS files:
#Googlebot User-agent: Googlebot Allow: * .css Allow: * .js
To test whether the Googlebot can detect all JS and CSS files correctly, you should in the Google Search Console on “Crawling> Fetch as Google” go.
There you click on “retrieve and render” (for once, Desktop ‘and once for, Mobile: Smartphone’). Then appears you whether certain files are bockiert for Googlebot.That should not be the case, and then you click on “send the index”, where the Googlebot should also note saying that the problems have been fixed.