Google Thinks Your Joomla Site Isn't Mobile Friendly...And THIS Is Why

As you’re probably aware, Google places a huge emphasis on mobile friendly web design, and we now know for certain that it directly affects your rankings in the search engine.

Google’s aim has always been to deliver the best results for the searcher, and because more people are now searching on their phones – the only way Google can deliver the best results is by providing mobile-friendly web pages in their search results.

From 2018 and beyond, if your website isn’t deemed mobile-friendly by Google you will struggle to gain any new visitors through your site. 

This can be a nightmare for small businesses who don’t have the budget to afford a web designer to turn their website responsive, but can be an even bigger nightmare when you’ve invested in the responsive web design and Google still thinks you aren’t mobile-friendly!

This isn’t an issue everybody is going to experience, as most CMS’s won’t give you this problem. I predominantly work in WordPress and have never found this to be something I need to deal with on client sites.

But if you’ve used Joomla for your website – you are very likely to experience this problem.

How Do I Know If Google Thinks My Website Is Mobile-Friendly?

Google are very keen on getting website owners to adopt a mobile friendly web design, and so they’ve actually put together a free tool you can use that’ll tell you whether or not they deem your website as mobile-friendly 

Visit: https://search.google.com/test/mobile-friendly and place your URL into the input field. Then click test URL and give it a few moments to check. After a minute or so, you will get back your answer. 

If it tells you your website is mobile-friendly then you have nothing to worry about, but if it tells you it’s not – we’ve got some work to do.

So Why Does Google Think My Joomla Website Isn’t Mobile-Friendly?

At this point I’m going to assume your website actually is mobile-friendly, and so I won’t go over how to make a website responsive to every device. 

Instead I’m going to share the reason I see Joomla websites failing the mobile-friendly test on a frequent basis, and the most likely reason why yours is too.

The Reason Your Joomla Site Is Failing Google’s Mobile Friendly Test

There’s a file in the root of your Joomla installation called robots.txt which is responsible for telling Google’s bots what it can and cannot crawl.

One of the folders it often tells Google’s bots not to crawl is the “templates” folder. 

And it’s this folder that contains all the code that makes your website mobile-friendly.

So by directly telling Google not to look in that folder, Google has no way of knowing your website is mobile-friendly. 

This is why you’ll notice your website rendered in the test without any CSS (it looks broken in the screenshot).

Which is a bit of a pain, but the good news is it’s actually quite an easy fix!

In fact, you should be able to get this sorted in less time than it took you to read this tutorial up to now.

All you need to do is go into an FTP client like Filezilla, connect to your server and open the public_html folder. 

You then need to locate the robots.txt file, right click and select edit.

It should look something like this:

# 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://www.sxw.org.uk/computing/robots/check.html

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

Look for where it says “Disallow: /templates/” and place a “#” before it. This turns that line into a comment, which means Google will treat it as if it wasn’t there.

While you’re there, you also want to comment out the media and images folder too. Check out this video I filmed for an explanation as to why.

Your robots.txt file should now look something like this:

# 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://www.sxw.org.uk/computing/robots/check.html

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

Then save your robots.txt file and reupload to the server. 

Lastly, run your web page back through Google’s mobile-friendly test to make sure it has fixed your issue.

Thanks For Reading This Joomla Tutorial

Did this fix your mobile-friendly issue? If so be sure to share this article across your social media platforms. Also, if you’re looking for a team of Joomla experts to help you out with your website, give us a call today on 01206 864441.

Share On Social Media