Joomla Search Engine Friendly URLS (SEF)



Joomla is a fantastic content management system that allows you to do, well, just about anything with your website – that’s why it is one of our CMS of choice for new clients. But when you install Joomla, search engine friendly URLs are not on by default, you need to configure it.

Joomla Search Engine Friendly URLs (URIs) SEF is for Apache server only. It uses mod_rewrite for pointing server to the right file along with PHP. There are only 3 lines in .htaccess for mod_rewrite directions.

Make sure you follow the following to generate google friendly urls in your Joomla installation.

To turn SEF support ON:

  1. You must run Apache
  2. You must have mod_rewrite enabled
  3. Your server must allow .htaccess override
  4. Set $mosConfig_sef= “1″ in configuration.php (if you cannot do it in the global config for any reason. If your file is UNWRITABLE you will need to change the file permissions of the file.
  5. Rename htaccess.txt to .htaccess

You will notice that sections/content/items have nice URLs like:

http://www.site.com/content/view/5/2/

and components have URLs like:

http://www.site.com/component/option,com_contact/Itemid,3/

Search Engine Friendly URLS (SEF) Troubleshooting:

  1. Check you run Apache
    • To check this go to administration > System > System Info.
    • Server type should be listed next to Web Server. SEF will not run on IIS.
  2. You must have mod_rewrite enabled
    • To check this go to administration > System > System Info. Click on PHP Information tab. Scroll down until you find Loaded Modules row. mod_rewrite should be listed here. If it’s not loaded ask your web host to activate mod_rewrite.
  3. Your server must allow .htaccess override
    • To check this delete everything from your .htaccess file and write a simple command here, for example:
    • Code: “Redirect /google.html http://www.google.com”
    • Now point your browser to http://www.yoursite.com/google.htm
      If it redirects you to Google.com then you are OK.
  4. Set $mosConfig_sef= “1″ in configuration.php
    • You can also activate SEF under Site > Global Configuration.
  5. Rename htaccess.txt to .htaccess
    • Remember! This can be done with a FTP program. Note the dot in the beginning! Also note that you can’t do this on windows, you must rename it directly on server.

Note that SEF is turned OFF by default.

Double check you renamed htaccess.txt to .htaccess and that you turned SEF on in configuration.php.

Still got problems with Joomla SEO SEF? Is your site live, or on a test server (we had problems with this) – try it when you have your domain name pointed at the site. :)

Related Joomla tutorials:

  1. Turn On Joomla Search Engine Friendly URLS (SEF)
  2. Install The sh404SEF Component
  3. Make Joomla URLS SEO Friendly
  4.  Good Page Titles & Clean URLs in Joomla
  5. Insert H1 Tags In Joomla
  6. Create A Unique Home Page Title In Joomla
  7. Prevent Duplicate Content Problems in Joomla

If you enjoyed this post, please share :)


4 Responses

  1. Rob says:

    Hi, maybe some of your readers will not know why they would want to have Search Engine Friendly URLs. I guess that depends on the (intended) readership. You might need this if you have a site that creates its pages ‘on-the-fly’ using PHP Java or some other page creation meachanism. These dynamic pages (so called, because the page is updated from a database of other data source) tend to put information in the URL address line which is a set of name value pairs inseted after question mark (?). Search engines tend to baulk if they encounter a URL which has a ? somewhere along the entry, and it’s usually the case that your page doesn’t get indexed. Search Engine Friendly URLs use one of a number of different techniques to place this dynamic information into the adddress (URL) a way that the search engine will like, thus adding your dynamic page to the billions already indexed on the WWW.

  2. Shaun says:

    Thanks Rob – I’m hoping to go into all this over the course of this week. Feel free to chip in :)

  3. craig says:

    Similar well working SEF solution for IIS: http://www.micronovae.com/ModRewrite/articles/SEFJoomla.html

  4. Shaun says:

    Thanks Craig :)



Learn how you can get more sales from your website

Subscribe for free and let us share with you:

  • how to submit your site to Google, Yahoo & Bing
  • how to optimise your site to get more traffic from Google
  • how to target the most valuable keywords for your business
  • how to make your site rank better in free Google listings
  • how to rank high & avoid Google penalties in 2013

Trust Hobo with your SEO plan

Find out more