Forum Moderators: open

Message Too Old, No Replies

Google Dropped the www. from our domain - possible resolution?

         

TerryMc

4:18 am on Sep 26, 2004 (gmt 0)

10+ Year Member



Google recently dropped the www. from our domain.. Everything still resolves ok just coming to sitename.com.. However, all our inbound links are set to come to www.sitename.com, therefore we have gone way down in the rankings.

Luckily, the very first line of code on all my pages is an include to a header.php file..

Is there any issues for google in adding this line of code? This way if google or anyone comes to sitename.com/dir/file.php, they are automatically sent to www.sitename.com/dir/file.php

<?
if (strlen($HTTP_HOST=="sitename.com"))
{
header("HTTP/1.1 301 Moved Permanently");
header("Location: [$HTTP_HOST$REQUEST_URI");...]
//exit();
}
?>

I decided to leave the exit commented out, just in case there was some type of error, then my visitors will still see the page except with a small parse error at the top..

Thoughts?