WWW vs. Non-WWW, The PageRank, The Effect And The Solution
So can you use both www.yoursite.com and yoursite.com to link to your site? Yes you can, but I strongly recommend that you don't!
Why? For SEO (Search Engines Optimization) reasons you should always use the same form for your links, pick one (with www or without www) and stick to it. This is called canonicalization and it means picking the best URL when you have a choice.
Here is the explanation:
Because www.yoursite.com is not the same as yoursite.com and if you have different inbound links to both URLs, this could cause two problems:First, some search engines might "think" that this is a duplicate content and penalize your site for this!
Second, splitting your links will affect your PageRank as PageRank is all about links, so if you have 1000 inbound links to www.yoursite.com and 500 inbound links to yoursite.com then you will have different PageRank for both URLs and you will lose valuable inbound links because they will be split into links for both URLs.
So what is the solution for this problem?
First, choose one form and stick to it. I prefer www.yoursite.com because this is what most people use. Also most people press (CTRL + Enter) in Internet Explorer or Firefox to append http://www and .com to whatever they have typed in the address bar of both major browsers.Second, in Google's Webmaster Tools, click "Preferred domain" and choose the same URL that you chose in the previous step.
Third, do something to redirect your traffic from one URL to the other (like from non-www to the www). That is what the major sites have done, try typing google.com, msn.com or yahoo.com and you will be redirected to www.google.com, www.msn.com and www.yahoo.com. The right method is to use "301 Moved Permanently" as this will make sure that search engines will combine the value of your inbound links.
I will show you two methods to do that. The best and the most frequently used method to do that is in a file called .htaccess (HTTP Access). It's a text file used in most Linux based web servers. Just make a text file called .htaccess and upload it to the root directory of your site or append those lines to it if the file is already there:
RewriteCond %{HTTP_HOST} ^yoursite.com [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L,R=301]
As I have told you this is the best and the fastest method, but what if you - for some reason - can not use the .htaccess method?
You can use PHP, just add those lines to your home page, but make sure they are the first lines in the page or you will get an error "headers already sent".
if (substr($_SERVER['HTTP_HOST'],0,3) != 'www')
{
header('HTTP/1.1 301 Moved Permanently');
header('Location: http://www.yoursite.com/');
}
?>
if (substr($_SERVER['HTTP_HOST'],0,3) != 'www')
{
header('HTTP/1.1 301 Moved Permanently');
header('Location: http://www.'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);
}
?>
Remember:
Always use the .htaccess file method if you can.Do not forget to replace "yoursite.com" with your domain name.
Well, most of the web world uses a linux_based web server, for a windows IIS-based server, you can use asp for 301 redirect like this: <%@ Language=VBScript %> <% Response.Status="301 Moved Permanently" Response.AddHeader "Location", "http://www.domain.com" response.end %> This script should be the first on the page. For a detailed how to redirect with IIS Read this: http://support.microsoft.com/default.aspx?scid=kb;en-us;313074&sd=tech About duplicate content, it's mentioned in many of the people working for Google blogs.
Nice posted "Turorialsroom.com", it was really informative and easy to catch up and its well explained and justified. As an SEO specilist too, i really appreciated and thank full for what you shared... more power for this room. Best Regards, ARED
I find it best to just set up a new website in IIS and define all additional domains (inc non-wwws) in the headers. From here you just fill in the redirect address and your sorted. One important thing though, don't forget to tick the 'Permanent Redirect' option otherwise you get the default 302/temporary redirect - this isn't good for your SEO... if you don't have access to IIS the only alternative is to put it in your asp/asp.net code as described in a previous post - just type in asp 301 redirect code in to Google. IIS needs more htaccess built into the application not as a third party addon, it would make life so much easier!
Well - I have more inbound links to non-www version but I am shifting to www version. I have moved permamanently my all nonwww URLs to www URLS. My question is should I redirect www to non www as I have better linkes in non www version. Or it has same effect in re-directing all URLS to one domain as at the end all inbound linkes will be considered as one URL. Please inform me in this case when you have more inbound and outbound linkes in one form of domain. Thanks !
To IT, It doesn't matter which version to choose (www or none-www), it's only important to choose just ONE version and stick to it. In your case, if you shift to the www version and do a 301 redirect you won't lose traffic at all because it will all be redirected automatically to the www version but you will lose your PageRank until the next Google update.So if you care much about that, don't shift, just redirect the www to the none-www version in case some on is linking to you with www.
We have implemented this for some of our clients and have seen some SEO success. I recommend choosing the www version because I think it just feels more reputable.
Very good explanation. It is not so much that Google penalizes you, although the effects are basically the same it is more that Google then sees that they are both the same and they decide which page has the most value and will present that page in the search engines and the other will not be listed which will result in a split of the backlinks to your pages and those that point to the page Google does not choose will be a wasted effort
- Flash Components the Combobox
Rating: 5.0/5 Votes: 1 - Using Input Text
Rating: 5.0/5 Votes: 1 - Drawing Crazy Lines With Actionscript
Rating: 5.0/5 Votes: 1 - Falling Bits Animation
Rating: 5.0/5 Votes: 1 - Planet Tutorial
Rating: 5.0/5 Votes: 1


![[del.icio.us]](http://www.tutorialsroom.com/includes/bookmarkify/delicious.png)
![[Digg]](http://www.tutorialsroom.com/includes/bookmarkify/digg.png)
![[Facebook]](http://www.tutorialsroom.com/includes/bookmarkify/facebook.png)
![[Furl]](http://www.tutorialsroom.com/includes/bookmarkify/furl.png)
![[Google]](http://www.tutorialsroom.com/includes/bookmarkify/google.png)
![[MySpace]](http://www.tutorialsroom.com/includes/bookmarkify/myspace.png)
![[Spurl]](http://www.tutorialsroom.com/includes/bookmarkify/spurl.png)
![[Squidoo]](http://www.tutorialsroom.com/includes/bookmarkify/squidoo.png)
![[StumbleUpon]](http://www.tutorialsroom.com/includes/bookmarkify/stumbleupon.png)
![[Technorati]](http://www.tutorialsroom.com/includes/bookmarkify/technorati.png)
![[Yahoo!]](http://www.tutorialsroom.com/includes/bookmarkify/yahoo.png)
![[Email]](http://www.tutorialsroom.com/includes/bookmarkify/email.png)






Not EVERYONE in the web world uses a linux-based web server. There is no '301 redirect' for a Windows IIS-based server - and some of us are stuck with IIS whether we like it or not !!! There is also NO factual basis for the ASSUMPTION that Google penalizes you for duplicate content.