2 minutes reading time (396 words)

Googlebot Cannot Access CSS and JS Files on...

Googlebot Cannot Access CSS and JS Files on...

Last month Google sent out its updated guidelines to gain visibility in Google search results. They involve accessing certain .css and .js files (stylesheets and javascripts) on your website. This affects the ranking of results. The following article explains what you need to do to your Joomla website to be in line with these new guidelines.

Many readers may have received an email recently from Google about its new webmaster guidelines, requiring some changes to the robots.txt file: http://searchengineland.com/google-webmaster-guidelines-updated-warn-blocking-css-javascript-files-206714

How do we solve it?

We have added our Joomla website in Google Web Master Tools. Next...

How does Google see what files need to be changed to improve my ranking?

Very simple: the following link will tell us how Google is understanding our Joomla site and which .css and .js files cannot be accessed: https://support.google.com/webmasters/answer/6066468?hl=en

We have detected files that Google tells us need exploring. 

How do we access them? 

Through our robots.txt file that we have in our Joomla web directory. Here we need to introduce the Allow indicator for all the files that Google is telling us that it cannot access. 

Example:
Typical files that must be given access are .css style sheets for our template. By default, Joomla restricts access to the templates directory through Disallow: /templates/ in our robots.txt file 

How do we grant access to our template style sheet that Google indicates it needs to access?

Assuming that our template is called "mytemplate", and as a rule all templates have a / css / directory, we will open the door through robots.txt to our CSS directory, or even all of our template directories. 
To do this we introduce one of the following options in our robots.txt:
Allow: / templates / mytemplate / css / 
Allow: / templates / mytemplate / 

How do you know if that fixes Google's access to these files?

Just re-run the utility "Fetch as Google" and it will show a new report on which directories and files are not accessible. If access is successful, that's fantastic, and we have a very important point to improve our ranking in search results. 

Finally, we must exercise caution when using the Allow and Disallow indicators, because a mistake could lead to blocking Googlebot's access to the entire website.

..and remember that "It isn't enough to know how, but also to make known", which will greatly improve your SEO.
Allow: / J! Rocks ;-)

0
10 Years of Joomla! Birthdays
 

Comments

Already Registered? Login Here
No comments made yet. Be the first to submit a comment

By accepting you will be accessing a service provided by a third-party external to https://magazine.joomla.org/