Actions

Difference between revisions of "Enabling Search Engine Friendly (SEF) URLs on Apache"

From Joomla! Documentation

(Added potential clarification about Non-SEF, SEF Ugly, and SEF Pretty URLs. Please confirm.)
Line 18: Line 18:
 
COMMENT:
 
COMMENT:
  
I believe there are three possibilities for how URLs may look in Joomla 1.5 or 1.6. Someone who knows better please confirm if this is true:
+
I believe the following are the most common possibilities for how URLs look in Joomla 1.5 or 1.6. Someone who knows better please confirm if the below is true:
  
 
<b>non-SEF</b> (Joomla 1.5 default): <code><nowiki>http://www.yoursite.org/8-category/7-alias</nowiki></code><br>
 
<b>non-SEF</b> (Joomla 1.5 default): <code><nowiki>http://www.yoursite.org/8-category/7-alias</nowiki></code><br>
Non-SEF URLs are not findable by search engines. See SEF Ugly for their other disadvantages. These are a result of Joomla generating dynamic webpages and the need ensure their URL's are unique. In Joomla 1.6 you won't see this unless you change default SEF Global Config settings above.  
+
This is typical of the easiest Non-SEF URLs to understand. None of them are findable by search engines because they don't have an ".html" suffix. See SEF Ugly for their other disadvantages. These are a result of Joomla generating dynamic webpages and the need ensure their URL's are unique. In Joomla 1.6 you won't see this unless you change default SEF Global Config settings above.  
 
   
 
   
 
<b>SEF Ugly</b> (Joomla 1.6 default): <code><nowiki>http://www.yoursite.org/8-category/7-alias.html</nowiki></code> <br>
 
<b>SEF Ugly</b> (Joomla 1.6 default): <code><nowiki>http://www.yoursite.org/8-category/7-alias.html</nowiki></code> <br>
These are findable by search engines but ugly to remember and harder for a visitor to paste in an email. Their length may break a pasted URL in an email so you lose visitors. Most websites link to other pages of the same site. Admin must paste those links into your site, the easiest way is to browse to the target page while editing the other. Even with the three settings above, this what you will get if your hosting service has not correctly installed the appropriate server change, such as Apache mod_rewrite above.
+
These are findable by search engines but ugly to remember and harder for a visitor to paste in an email. Their length may break a pasted URL in an email so you lose visitors. Most websites link to other pages of the same site. Admin must paste those links into your site, the easiest way to use SEF Ugly links is to browse to the target page while editing the other. Even with the three settings above, this what you may get if your hosting service has not correctly installed the appropriate server change.
  
 
<b>SEF Pretty URL</b>: <code><nowiki>http://www.yoursite.org/alias.html</nowiki></code><br>  
 
<b>SEF Pretty URL</b>: <code><nowiki>http://www.yoursite.org/alias.html</nowiki></code><br>  
This is findable by search engines and easy to remember. It is easier for Admin to type into another page of site or for a visitor to type in an email. This requires Joomla 1.5 or 1.6 with the three SEF settings as above, plus the appropriate server change installed, such as Apache mod_rewrite. Notice Admin is responsible for ensuring alias names are unique for each page of your site, otherwise results are unpredictable when they are visited.
+
This is findable by search engines and easy to remember. It is easier for Admin to type into another page of site or for a visitor to type in an email. This requires Joomla 1.5 or 1.6 with the three SEF settings as above, plus the appropriate server change installed. Notice Admin is responsible for ensuring alias names are unique for each page of your site, otherwise visiting results are unpredictable.
 
+
You want SEF Pretty URLs as early as possible. They will bring visitors back because they remember it or a friend sent them an email about it. Converting from non-SEF or SEF Ugly can be a lot of URL retyping in your site. Search engines rate the URL itself worthy as a search result. Changing the URL later will lose prior history about the search result value of your site unless you take further measures.
+
  
 +
You want SEF Pretty URLs as early as possible. They will bring visitors because they remember it or a friend sent them an email about it. Converting from non-SEF or SEF Ugly can be a lot of URL retyping in your site. Search engines rate the URL itself worthy as a search result. Changing the URL later will lose prior search value history about that page unless you take more technical measures.
 +
<p>
 +
[[User:Tmccully|Tim McCully.  In Genesis God uses one word for the light of day, the best part of hat we call &quot;day&quot; now. http&#58;//TheTruthLover.com]] 03:46, 12 February 2011 (UTC)
 
[[Category:FAQ]]
 
[[Category:FAQ]]
 
[[Category:Administration FAQ]]
 
[[Category:Administration FAQ]]

Revision as of 21:46, 11 February 2011

This article addresses SEF URLs under the popular, open-source Apache webserver.

SEF URL implementation is possible under Microsoft's IIS webserver as well, please see IIS and Joomla.

Joomla 1.6 In Joomla! 1.6 basic SEF urls are enabled by default. In prior versions you need to use the Global Configuration to enable them. The instructions below still apply if you want to use Apache's mod_rewrite.

Apache Instructions

  1. Rename htaccess.txt to .htaccess.
    If Joomla is installed in its own folder, uncomment "RewriteBase /" and enter the Joomla folder name after the backslash.
    Example: RewriteBase /joomla
  2. Make sure that Mod_rewrite is working. Check that the line shown below in the file "apache/conf/httpd.conf" is uncommented. If necessary, uncomment the line and re-start the Apache web server.
    LoadModule rewrite_module modules/mod_rewrite.so
  3. In Global configuration, set the three SEF options. The action of the three parameters is as follows:
    • Search Engine Friendly URLs. Converts the URLs from the native Joomla! format to the SEF format.
    • Use Apache mod_rewrite. Uses the Apache "mod_rewrite" function to eliminate the "index.php" portion of the URL. If you don't want to use mod_rewrite, set this to "No" and don't rename the htaccess.txt. The SEF URLs feature will still work. The only difference is that you will see "index.php" in the URL, for example, http://www.yoursite.org/index.php/faq.html.
    • Add suffix to URLs. Adds ".html" to the end of URLs.

COMMENT:

I believe the following are the most common possibilities for how URLs look in Joomla 1.5 or 1.6. Someone who knows better please confirm if the below is true:

non-SEF (Joomla 1.5 default): http://www.yoursite.org/8-category/7-alias
This is typical of the easiest Non-SEF URLs to understand. None of them are findable by search engines because they don't have an ".html" suffix. See SEF Ugly for their other disadvantages. These are a result of Joomla generating dynamic webpages and the need ensure their URL's are unique. In Joomla 1.6 you won't see this unless you change default SEF Global Config settings above.

SEF Ugly (Joomla 1.6 default): http://www.yoursite.org/8-category/7-alias.html
These are findable by search engines but ugly to remember and harder for a visitor to paste in an email. Their length may break a pasted URL in an email so you lose visitors. Most websites link to other pages of the same site. Admin must paste those links into your site, the easiest way to use SEF Ugly links is to browse to the target page while editing the other. Even with the three settings above, this what you may get if your hosting service has not correctly installed the appropriate server change.

SEF Pretty URL: http://www.yoursite.org/alias.html
This is findable by search engines and easy to remember. It is easier for Admin to type into another page of site or for a visitor to type in an email. This requires Joomla 1.5 or 1.6 with the three SEF settings as above, plus the appropriate server change installed. Notice Admin is responsible for ensuring alias names are unique for each page of your site, otherwise visiting results are unpredictable.

You want SEF Pretty URLs as early as possible. They will bring visitors because they remember it or a friend sent them an email about it. Converting from non-SEF or SEF Ugly can be a lot of URL retyping in your site. Search engines rate the URL itself worthy as a search result. Changing the URL later will lose prior search value history about that page unless you take more technical measures.

Tim McCully. In Genesis God uses one word for the light of day, the best part of hat we call "day" now. http://TheTruthLover.com 03:46, 12 February 2011 (UTC)