Joomla SEO - How to Implement SEO in a Joomla 5 Website?

By: Joseph de Souza

How to SEO your Joomla 5 website with details of settings, technical changes required and Speed optimizations. Checklist included at the end.

Website Structure

  One of the most essential things that we have to set in order when doing SEO is the site structure. In fact site structure is the most important thing when building a new site, but very often not much attention is paid to this very important aspect.
Joomla as we all know is a very popular Content Management System, but by default it has dynamic urls of the form http://www.mysite.com/index.php?option=com_content&view=article&id=19&Itemid=27 . Such URLs are very hard to remember for the site visitors and are also not very SEO friendly. If we have an URL like http://www.mysite.com/my-best-cms.html it will be easy to remember for the site visitors and will also help the search engines know what your page is all about.

Changing Dynamic URLs To Static URLs For Existing Joomla Site

Before starting this process, one must keep in mind that there should not be any broken links and that the incoming links to the site do not get broken. Joomla content management system will still display the page if the dynamic url is typed in the address bar of the browser even after changing to SEF URLs so we do not have to bother on that account.
However now there exists a problem of duplicte URLs or rather Four or more URLS that will display the same URLs. This is because, besides the dynamic and the SEF URLs, we also have the www and non-www versions of each of them. The solution is to have canonical URL Tag inserted in the section of the web page. The Canonical URL is the URL of the preferred page which you want the search engines to display from a set of pages having same or very similar content. Here it makes sense to specify the page which has the search engine friendly static URL. More details regarding this is given in Creating Search Engine Friendly URL's in Joomla.
For example, in the case above we would specify it as
<link rel="canonical" href="http://www.mysite.com/my-best-cms.html"/>
Joomla - Search engine friendly static URL

Making the Settings in the Control Panel of Joomla 5

The first point is to do the settings in the control panel.Log on to Joomla backend from the administrator log on page and open Global Configuration Go to Global Configuration. Under meta just make sure that the meta robots field is index, follow.
Next is the SEO section. Here switch on Search Engine Friendly URLs. This converts the dynamic URLs to the SEF format.
Enable Add suffix to URLs and Save. This option adds .html to the end of URLs.
Enable URL Rewriting
Joomla -  SEO  Settings in the Control Panel

Rename htaccess.txt to .htaccess

For a Linux based hosting where mod_rewrite function of Apache (or Litespeed ) is available on your server, we have to rename the file htaccess.txt in Joomla base folder to .htaccess. This is necessary if we wish to remove the "index.php" from the URLs.

Download the file .htaccess and open it in a text editor like notepad.
You have also to enter the name of your Joomla folder if it is not installed in the root directory (/).
Uncomment RewriteBase / (By removing the first character, #).
Then enter the name of your Joomla installation directory after the backslash (e.g. RewriteBase /myjoomlafolder/)
Save the file and reupload it to your website.

Joomla -  htaccess file

A descriptions of the different types of URLs generated in Joomla 5.x is given in Joomla 5 Search Engine Friendly URLs. After we have uploaded the .htaccess file (as described above) the next step is changing the settings the control panel to enable Search engine friendly URLs without /index.php/.
Also, in this section the settings for Unicode Aliases as well as Site Name in Page Titles has to be kept NO.

Redirecting Non-WWW to WWW Version

We can also include the necessary redirect code to redirect the non-www version to the www version of the website. This will be possible in Linux hosting with mod_rewrite function of Apache enabled. Once again open .htaccess and add the 3lines (Shown below) after # mod_rewrite in use as shown below. Replace mysite with the name of your website, and proper TLD(In the example below .com is the TLD). Once again Save the file and reupload it to your website.
#
# mod_rewrite in use
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite\.com [NC]
RewriteRule (.*) http://www.mysite.com/$1 [L,R=301]

Changes Required To Display Canonical URL Tag

We can enter a canonical tag for each page in Joomla by using a plugin called Custom Canonical CK . On each page under publishing we can specify the canonical tag. We can also specify the meta description and meta keywords (not used by Search engines any more).
Joomla - Ordering Menu Items

Under the options we can specify the page title (Browser Page Title) - The one that appears in the visitors browser or search Engine Results.

Joomla - Specify the  Browser Page Title

The second point is we have to remember is to use the same alias (slug) for the web page in the web page settings as well as in the menu. This will help maintain the same url for the page throught. Also be consistent during internal linking, when specifying the URL. Joomla - Specifying the URL of a Web Page

Menu Settings in Joomla

When entering the page alias (slug) in the menu keep it consistent with what you have specified at the page level. Also keep the browser page title (Page Display tab) and the meta description (Meta Data tab) blank in the menu section. You have to be aware that the page title (that which appears on the browser tab or the search engines) is set either in the article publishing settings or under the Page Display tab of the corresponding menu item.
Joomla -SEO settings for page display in menu

Robots Meta Tag

There is the Robots setting in Joomla under Global Configuration > Site > Metadata Which will decide if the web crawlers and search engines will index the site or not. There’s four options:
index,follow -
noindex, follow -
index, nofollow -
noindex, nofollow -
index- means index the contents of a web page. The search engines will crawl the page and if they deem fit, they will display it in the search results.
noindex - Do not show this page, media, or resource in search results. If you don't specify this rule, the page, media, or resource may be indexed and shown in search results.
follow - Follow the links on this page and use it to discover new pages.
nofollow - Do not follow the links on this page. If you don't specify this rule, Google may use the links on the page to discover those linked pages
More details are given in Crawling and Indexing documentation by Google.

Leverage Browser Caching

In case you want to utilize browser caching to make your Joomla site faster, you can instruct the visitors browser to cache certain types of content found on your site, and let them know how long to store them for.
To implement this, you can just add these lines of code to the bottom of your .htaccess file:
<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Default directive
ExpiresDefault "access plus 1 month"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
# CSS
ExpiresByType text/css "access plus 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType application/js "access plus 1 week"
</IfModule>
Joomla - Enabling Browser Caching

Enable GZip

A good way to further improve your Joomla website load times is to use Gzip to compress your HTML , CSS and javascript output. Joomla allows us to enable Gzip right from the Global configuration. Simply click on the Server tab on the Global Configuration panel and switch the option for Gzip compression to "Yes". Joomla - GZip Compression Settings

Adding Noindex to Internal SEARCH Page

Another customization is to add noindex to the search pages generated by the the Joomla search facility which searches only within your site. This is achieved by means of a template overide for the com_finder module as shown below. Joomla - Template Override com_finder module

Joomla SEO Checklist:

  • Have a proper site structure
  • Change Dynamic URLs To Static URLs For Existing Joomla Site
  • Making the Settings in the Control Panel - meta robots field is index, follow, switch on Search Engine Friendly URLs and enable Add suffix to URLs and Save.
  • Enable URL Rewriting
  • Rename htaccess.txt to .htaccess
  • Redirect Non-WWW to WWW Version
  • Make the changes required to display Canonical URL tag
  • Specify the meta description and the page title (Browser Page Title)
  • Keep the browser page title (Page Display tab) and the meta description (Meta Data tab) blank in the menu section
  • Leverage Browser Caching by making changes in .htaccess file
  • Enable GZip -Use Gzip to compress your HTML , CSS and javascript output
  • Add Noindex to Internal SEARCH Page


  

About The Author

Joseph de Souza is a leading Freelance SEO consultant and Web developer in Goa, India with more than 17 years of experience in internet marketing.
He has a proven track record and has has helped several companies increase their traffic many times over and thereby increase their revenue and profits.
Besides English, Joseph has also successfully optimized two German language websites and a Danish language website and obtained outstanding results.