Dec 21
2009

Search Engine Friendly (SEF) URLs and Joomla

Posted by: admin in CMS

Tagged in: seo , joomla

By default, all Joomla URLs reference the same Web page (index.php) and use query string parameters to specify individual menus or articles to retrieve. For example, the URL to a standard Joomla article might look something like this:

http://www.example.com/index.php?Itemid=27&option=com_content

To a search engine, this URL is confusing. A search engine spider (the program that indexes a Web site) isn’t very good at discerning that the query string holds the ID reference to the article. In general, a query string is just as likely to hold site visitor parameters as references to particular content. Here is the URL with query string for a common Web site that includes a query string ID:

http://www.example.com?userid=98239992107&viewsetting=ATVPDKIKX0DER

A search engine wouldn’t want to record such user variables. It is difficult for a program such as a spider to know the difference between these user parameters and article reference information. For this reason, the spider will often ignore most of these parameters, so the default Joomla URL setting would generate very poor site ranking.

Fortunately, there is a solution to this problem in the Search Engine Friendly URLs settings in the Global Configuration. Figure 13-1 shows the SEO Setting frame in the Administrator interface. There are two options that related to SEF URLs: “Search Engine Friendly URLs” and “Use mod_rewrite.”

If only the SEF URLs setting is activated, a Joomla article URL will appear like this:

http://www.example.com/index.php/joomla-overview

This type of URL is exactly what a search engine needs to properly index a Web site. New to Joomla 1.5, this setting uses a technique whereby the reference to the index.php file in the URL is executed by the Web server. When executing, it interprets the path that follows it and returns the requested page. This technique can work on both Apache server and IIS.

To work on Apache server, the AcceptPathInfo directive must be set to On. You can find complete information about this directive on the Apache site at http://httpd.apache.org/docs/2.0/ mod/core.html.

If this directive is not active on your Web server (as sometimes is the case with ISPs), you must activate the “Use mod_rewrite” option to get SEF URLs. With this option active, the URL will look something like this:

http://www.example.com/home/44-godaddy-joomla-hosting-tips

In contrast to the first technique (which references the index file that interprets the path following it in the URL), mod_rewrite is an Apache module that detects if a URL that is being accessed does not really exist. If the URL is not found, the command settings in the .htaccess file are accessed, and the module will redirect the Web server in the background to the desired content.

For the mod_rewrite option to work, you must rename the htaccess.txt file at the Joomla root direc- tory to .htaccess. On the Windows platform, Windows Explorer will reject this filename as illegal. You will need to use the ren (rename) statement at the command prompt, which will perform the operation.

Be sure to activate your SEF options before you register your Joomla site with the search engines. If they are activated after the site is already indexed (or potentially other sites have linked to the old URLs), your site could lose traffic or ranking, as the originally spidered URLs are no longer valid.

If you already have a site deployed on an older version of Joomla and are currently using an SEF extension, when you upgrade to Joomla 1.5, be sure to use this same extension. Since the Joomla 1.5 SEF URLs are likely different from your old URLs, old links will get a” page-not-found” error and potentially destroy your site ranking.

If you are converting a static Web site to a Joomla deployment, and you already have pages ranked on the search engine, use one of the available extensions (such as OpenSEF) instead of the built-in SEF functionality. Other extensions allow you to manually define the SEF URLs specifically for particular articles or categories. You can create URLs that match your original URLs, so the changeover will be transparent and you will not lose your ranking.


Comments (0)Add Comment

Write comment

busy

Latest posts from our blog...

Tags

Copyright © 2009 Webhostingart.com. All rights reserved unless otherwise stated.