Hello! I've been promoting one of my site without the www. prefix. I was curious if it makes any difference? I have around 57k+ links pointing to a domain of mine, without the www. but with the www. I have only 100+ links... I'm new to building links though... So really curious!
I have this code in my index.php to do a permanent redirect: // non-www redirect if (strstr($_SERVER['SCRIPT_URI'], “http://yourblogâ€) !== false) { $newLocation = str_replace(â€http://yourblogâ€, “http://www.yourblogâ€, $_SERVER['SCRIPT_URI']); header(â€HTTP/1.1 301 Moved Permanentlyâ€); header(â€Location: “.$newLocation); } Make sure to replace "yourblog" with your domain. Also make sure to inform Google directly of this change by choosing the preferred domain in Google Webmaster Tools.
Add this to your htaccess file RewriteEngine On RewriteCond %{HTTP_HOST} ^www.yourdomainname\.com$ [NC] RewriteRule ^(.*)$ http://yourdomainname.com/$1 [R=301,L] This will make http://www.yourdomainname.com into http://yourdomainname.com
If you have links going to both, a redirect may increase your PR, but it isn't going to hurt you. Google sees the www. and non-www as two different pages, so PR is divided between the two. A redirect makes all you links point to a single page instead of two.
Thanks, I had no idea that page rank is divided between www. and non-www. that would have saved me hours of work, thanks again