Verge Studios Blog about Graphic Design, Web Design, and Joomla

Activating SEO friendly URLs in Joomla

There exists a significant debate about how effective search engine optimized (SEO) friendly URLs are in determining a website's rank in various search engines. However, little debate exists to how it aids in people navigating web pages and understand the content they are looking at. For example a url ending in this:

http://myjoomla.com/index.php?option=com_content&view=article&id=57&Itemid=272

makes a lot less sense than something like this:

http://myjoomla.com/foo/bar

Thankfully, Joomla makes it very easy to activate SEO friendly URLs. They can come in two flavours depending on your server set up. We will discuss both in detail, but first we need to know how to configure Joomla for SEO friendly URLs. Conveniently enough all it requires is to login to the Joomla back end and to select "Global Configuration" from the "Site" Menu option. On the right side of your screen you should see the following:

The first option tells Joomla to use SEO friendly URLs. This option alone will however change the URL in the following manner:

http://myjoomla.com/index.php/foo/bar

instead if our desired:

http://myjoomla.com/foo/bar

This is because Joomla itself cannot change the technological constraints put upon it by the web server. To get the totally clean URL we need to rely on a module provided by the Apache web server called, mod_rewrite. mod_rewrite is invoked by a file known as .htaccess with gives Apache directions on how to interpret the directory the .htaccess file is in. This is what the second SEO setting is about. To use the cleanest version of SEO URLs in Joomla you therefore need Apache as your web server with mod_rewrite installed (Note: This also works on windows, if Apache and mod_rewrite are properly installed). Joomla conveniently provides you with a sample .htaccess file, named htaccess.txt that you just need to copy to activate. For example on a linux server all you would need to do from the command line is:

cp htaccess.txt .htaccess
and you should be good to go after you activate the second option in the Joomla SEO settings menu. If you do not have Apache or have trouble with mod_rewrite, then just keeping the option using index.php/foo/bar is just fine. The last option will add a suffix to the url like:

http://myjoomla.com/foo/bar.html

which makes it easier for some search engines and programs to handle the URLs. Please note, that sometimes depending on server configuration you may have to edit the .htaccess file and comment out the following line as it can cause problems:
##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

Comments

Posted by Marcus Dane (http://) on March 29, 2010 at 03:06 pm
Thank you for posting instructions on how to activate SEO friendly URLs in Joomla, because I think that people haven't totally learned about this. As an employee for a SEO web design company, building a SEO friendly URL is taught from the start. Reply
Posted by uggs outlet (http://boots-stores.us) on June 24, 2010 at 03:26 am
thanks Reply
Write A Comment
 
Please input the anti-spam code that you can read in the image.