Wednesday, 11 March 2015Written by Alan Foster

As Joomla has matured over the years it has become more and more search engine friendly which is very important to anyone considering using a content management system to build a website site. One of the great built-in seo tools it has to offer is the option to use search engine friendly URLs. This blog post will guide you through how to enable SEF URLs for the latest version of Joomla.

Why enable search engine friendly URLs

Before we get started we want to outline some of the benefits of enabling SEF URLs.

  • Website visitors are more likely to remember the SEF version of the URL.
  • People are more likely to visit the SEF version of the URL which appears in the search engine results or on social media websites rather than visiting the non search engine friendly version of the URL.
  • If other websites or social networking sites want to reference an article you have published at your website it is easier to link directly to the SEF version rather than linking to the non SEF version.
  • It helps the website visitor to understand what the article is about based on the information included in the URL.
  • It adds an additional layer of security to your website. Their are bots which crawl the internet every minute of the day looking for ways to exploit websites and one of the approaches they use is to look at the format of the websites URLs. A website can be easily identified as running Joomla based on formatting of the URLs which include PHP, ?, component name.

What will you need to setup the search engine friendly URLs

  1. Access to the Joomla Administrator area of your website.
  2. FTP Software installed on your computer to access hosting space where you have installed and setup the website in order to rename and update the htaccess.txt file.

Note: The information included in this blog post is for websites hosted on a Linux based platform and does not include information for websites hosting on a Microsoft based IIS platform.

What do non SEF URLs look like

By default SEF URLs are not enabled in Joomla when you first install and setup the content management system.

The URL format of the categories, articles and menu items you create and publish at your website will include references to PHP, ?, component name, category and article ID and item ID as show below.

As you can see from the above example the structure of the URL does not look very user friendly and does not clearly describe the contents of the article you have published at your website.

How do I enable search engine friendly URLs without using URL rewriting

  1. Log into the administrator area of your website and select the system menu and global configuration menu.
  2. You will now see the SEO settings where you can enable or disable specific settings.
  3. To enable SEF URLs without URL rewriting select the Search Engine Friendly URLs option to Yes and save the changes as show in the screen shot below.

When you now view the category or article URL structure it will look similar to this screen shot.

As you can see from the above the URL looks more user friendly and it clearly describes the contents of the article you have published to your website.

The only downside is the index.php included in the URL structure. It would look even better if this was removed.

To remove the Index.php from the structure of the URL you will need to enable URL rewriting and rename the default htaccess.txt file to .htaccess

How do i enable SEF URLs using URL rewriting

Before you enable this setting in Joomla you need to rename the default htaccess.txt file to .htaccess file so the Apache server can understand the file name and rewrite the URLs correctly using mod_rewrite.

We recommend renaming the htaccess.txt file to .htaccess using your FTP software rather than downloading the htaccess.txt file to your computer and renaming it.

How Do I Rename the htaccess.txt file to .htaccess

To rename the htaccess.txt file located in the root of the public_html or home directory complete the following steps.

Log into the website using your FTP software and rename the htaccess.txt file to .htaccess

Please note you must add the dot . before the htaccess file when renaming it from htaccess.txt to .htaccess

As you can see from the above images the default htaccess.txt file has now been renamed to .htaccess

Once you have completed the above steps you can now enable URL rewriting by completing the following.

  1. Log into the administrator area of your website and select the system menu and global configuration menu.
  2. Set Use URL Rewriting to Yes and save the changes as show in the screen shot below.

The structure of the URL will now look like the image noted below. You will also notice the reference to index.php has now been removed from the URL.

How do I add A HTML suffix to the URL

To add a HTML suffix to the format of the URL complete the following steps

  1. Log into the administrator area of your website and select the system menu and global configuration menu.
  2. Set Adds Suffix To URL to Yes and save the changes as show in the screen shot below.

The search engine friendly URL format will now include the html suffix at the end of the URL as show in the screen shot below.

You can also enable the Unicode Aliases which controls how non-latin characters are handled in your aliases.

You also have the option to display the your website site name before or after the titles of the articles you publish at your website by changing the Include Site Name Page Titles setting. You can also disable the site name.

Video Tutorial

We have created a video tutorial which will guide you through enabling SEF URL's at your website. Watch the video tutorial

We hope you found this blog post useful to help get the most out of your website and to make it more user friendly to both website visitors and search engines.