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:
- You must run Apache
- You must have mod_rewrite enabled
- Your server must allow .htaccess override
- 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.
- 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:
- 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.
- 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.
- 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.
- Set $mosConfig_sef= “1″ in configuration.php
- You can also activate SEF under Site > Global Configuration.
- 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:




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.
Thanks Rob – I’m hoping to go into all this over the course of this week. Feel free to chip in :)
Similar well working SEF solution for IIS: http://www.micronovae.com/ModRewrite/articles/SEFJoomla.html
Thanks Craig :)