WordPress style SEF URLs for Joomla with Route 66 Plugin

Written by  Tuesday, 16 May 2017 21:28
    WordPress style SEF URLs for Joomla with Route 66 Plugin Wilfred Iven - https://pixabay.com/en/users/FirmBee-663163/

    SEF URLs and SEO, in general, is one of the most important parts of a website and one of the reasons why most people prefer WordPress over Joomla!. In this blog post, we will show you how you can add WordPress style SEF URLs to Joomla and improve your site's SEO performance in general, using our excellent Route 66 plugin.

    The Problem

    The biggest problem with Joomla SEF URLs is that you cannot have an alias (slug) only URL unless you create a menu item. 

    The Solution

    Route 66 can generate any kind of URL for Joomla. It is working with URL patterns which means that it has unreached flexibility when compared with other Joomla SEF extensions/plugins.

    Getting Started

    The first thing you have to do is download Route 66. It's free for the core Joomla! content but you will need a subscription if you plan to use it with K2, Virtuemart or Hikashop. Once you get Route 66 just install it as you would do with any other Joomla! extension. Finally, make sure that SEF URLs are enabled in Joomla Global Configuration.

    Setup

    Right after you install Route 66 navigate to "Components" -> "Route 66" in your site's administration area. Make sure that the plugins are enabled and then enter your desired URL patterns. Here are some URL patterns you can use with Route 66:

    blog/{articleYear}/{articleMonth}/{articleAlias}
    {categoryAlias}/{articleAlias}
    {articleAlias}
    page-{articleId}

    As you can see you can mix custom words with article variables to define the URL patterns. In our case we want to generate alias (slug) only URLs so we will use the following pattern for Article URLs:

    {articleAlias}

    Save the plugin options and that's all! Now all your articles URLs on your site will have the following form: http://www.yoursite.com/article-alias. 

    Bonus: Handle Duplicate URLs

    Duplicate URLs are the second problem that Route 66 solves. In Joomla, you can access the same page using different URLs. For example, all the following URLs can lead to the same article:

    • index.php?option=com_content&id=1
    • component/content/article/1
    • category-menu-alias/article/1
    • menu-item-alias

    Route 66 by default will redirect all those URLs to the URL generated by the pattern. It will also handle correctly the canonical links for the article pages!

    Demo

    The URL of the page you are reading right now is generated by Route 66. This is not a Joomla menu item! Make sure to check the video below which demonstrates how to setup SEF URLs using Route 66 for Joomla.