J!Extensions Store™
Faq Can i rely on the Google mobile-friendly test?

Can i rely on the Google mobile-friendly test?

Created on:Thursday, 24 July 2014 08:08

You can run the Google mobile-friendly test and rely on the result only after a proper configuration of the robots.txt.

The main issue is about the Google test itself, because if the robots.txt is not properly configured the test result will not be correct and reliable, being all css files blocked and disallowed by the robots.txt. In this case the Google test sees the mobile site as it's not in reality, as shown in the 2 screenshots. This affects all Joomla! versions prior to Joomla! 3.4 that has been updated and fixed for the Google mobile test.


faq image

The first thing to do before run this kind of tests would be allowing Googlebot to access css resources. After that, the test can be repeated ensuring that the Google test will be able to evaluate the real site as is.

Until you don't allow Google to access every real resources used to style mobile layout you can't rely on this test.

You can take this site as an example http://storejextensions.org/, if you run the Google mobile test for our site you will see that it's reported as mobile friendly and the Google preview is exactly the same as the site appears on mobile, indeed all the css resources are not blocked for Googlebot.

This is a problem about Joomla itself, because the Joomla! team has not updated the default robot.txt accordingly
to this Google test shipped recently, until the release of Joomla 3.4.
If you open the default Joomla! robots.txt it will be probably as follow:



# If the Joomla site is installed within a folder such as at
# e.g. www.example.com/joomla/ the robots.txt file MUST be
# moved to the site root at e.g. www.example.com/robots.txt
# AND the joomla folder name MUST be prefixed to the disallowed
# path, e.g. the Disallow rule for the /administrator/ folder
# MUST be changed to read Disallow: /joomla/administrator/
#
# For more information about the robots.txt standard, see:
# http://www.robotstxt.org/orig.html
#
# For syntax checking, see: # http://tool.motoricerca.info/robots-checker.phtml

User-agent: *
Disallow: /administrator/
Disallow: /bin/
Disallow: /cache/
Disallow: /cli/
Disallow: /components/
Disallow: /images/sampledata
Disallow: /includes/
Disallow: /installation/
Disallow: /language/
Disallow: /layouts/
Disallow: /libraries/
Disallow: /logs/
Disallow: /media/
Disallow: /modules/
Disallow: /plugins/
Disallow: /templates/
Disallow: /tmp/


And the 'templates' folder is completely blocked to Google, so remove the line to allow access. After that the effect won't be immediate, Google requires 2-3 days to refresh the robots.txt. Once refreshed the robots.txt you can repeat the Google mobile test and check real results.



faq image