Page is a not externally linkable
- Google
-- Google SEO News and Discussion
---- pr 0 in home page but pr 5 on sub page


lobo235 - 1:49 pm on Nov 30, 2005 (gmt 0)


Well, the reason that you would want to do it is to avoid getting hit with a duplicate content penalty from Google. For example, if you have the page www.example.com/index.html it will also exist at example.com/index.html. Google and other engines may give one of the sites (either non-www or www) a penalty and most the pages will not show up in the search engine's index. Here is the snippet from my common.php file that performs the permanent redirect from non-www to www:

if ( $_SERVER["HTTP_HOST"] == "example.com" ) 
{
header( "Location: http://www.example.com".$_SERVER["REQUEST_URI"] );
exit( );
}

This can also be done using the .htaccess file with apache. Check out the apache we server forum to find more info on using that method.


Thread source:: http://www.webmasterworld.com/google/32206.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com