WWW or No WWW in Domain Names

This is something simple that all blogs can do and all blogs should do, but not all blogs do. Do you know that http://www.gotchance.com and http://gotchance.com are treated by search engines as two different websites. So, the search engine results may split up and even worse the Google PageRank will split too. So, it is generally a good practice to do a Search-Engine-Friendly redirect from on to the other.

Here i have chosen to redirect www.gotchance.com to gotchance.com. But that doesn’t make any difference. Here’s how to do it. Just add the following code to your .htaccess file in the root directory of your domain :

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^www.yourdomain.com [nc]
rewriterule ^(.*)$ http://yourdomain.com/$1 [r=301,nc]</code>
If you want to do it otherwise (i.e) from Non-WWW to WWW, here's the code :
<code>Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^yourdomain.com [nc]
rewriterule ^(.*)$ http://www.yourdomain.com/$1 [r=301,nc]

Now, go ahead and start concentrating your SE Optimization on one domain.

UPDATE : When i checked the FeedBurner stats (while making this post), i noticed something that is very much related to this post. Here is a screenshot. I use gotchance.com/feed for my FeedBurner feed and www.gotchance.com shows as one of the top referrers. This is before i started redirecting www to non-www :

Referrer

29 Responses to “WWW or No WWW in Domain Names”

PJ says:

Hello,

I have been quite concerned about this issue as well. May I ask how I can do the re-directing from WWW to the non-WWW address on Blogger? (I am using the new version.)

Thank you very much in advance for your answer!

PJ

Hari says:

Hi PJ,
Thats a nice question. But, i actually think that there is no way to do such a 301 redirect on your blogger account. Like you want http://www.atouchofblusher.blogspot.com/ to http://atouchofblusher.blogspot.com/ Right ?

I think thats not possible.

PJ says:

Hi Hari,

Thank you very much for your reply.

I see. Yes, that is what I would like to do. A month ago, the Google PageRank of my non-WWW site (which I do SEO for) dropped from 4 to 2. I still can’t figure out what happened. Even though my traffic has not been affected at all (it has still been increasing steadily), I would still like to bring the PageRank back up. (By the way…my WWW site has always had a PageRank of 2.)

PJ

Hari says:

Yea, having different ranks for different domains is a pain. Haven’t you considered moving on into a self-hosted blog, if you are serious about blogging ?

PJ says:

Hello Hari,

I have been considering it indeed. I will probably work with a friend of mine who can help host my blog.

Hari says:

Oh Cool ! If you are looking for free hosting, try Zymic.com Just started out recently. They don’t have cPanel. Thats what i don’t like.

PJ says:

Thank you for the information! I will have a look at it. I will e-mail you if I have any question.

Great post! Thanks for the info, keep up the good work!

Norman says:

Yup, I’ve done the same with my website.

Thank you for this information, I actually just remembered that htaccess is that powerful with link redirections to my main page, I’ve heard rumors saying that www can actually mess up your google SERPS.

Hari says:

www can actually mess up your google SERPS.

Hmm.. I’ve not heard that before…

Chicago says:

A good man would prefer to be defeated than to defeat injustice by evil means.

steven john says:

this is the worst rule i have ever seen. Well looks like we have to live with it.

Babes says:

It is true, I’ve encountered this problem before. It is really easy to fix just do what he told you to add and it should be fine. You get more pagerank and you will be higher on google’s index. So why not do it right? It really isn’t a bad rule steven john just a tip.

shaw says:

Wow, been reading up since finding you site yesterday. Seems like there are tons of things that need to be done to not only get your site to rank, but keep the juice from leaking out! Id didn’t think it mattered as long as you just chose one and stuck to it…guess you live and learn. Better change things on my site!

Angela says:

I wondered where all the www’s went to! Now I understand a bit. Thanks for the informative post.

Angela

Hari says:

@shaw, Exactly.. The way we should have our websites have changed long since.. Earlier, quality content was the only requirement to rank well.. Nowadays there are a lot more, like meta tags, page titles, domain redirection etc. etc…

blogg says:

Very nice information. Thanks for this.

blogg says:

Can you provide more information on this?

Fun Director says:

Hi, Like the sense of humor in the articles. The site is a literary masterpiece. This site is capital constantly providing fairness reviews and infos.

Josh Patrone says:

Pretty nice… Hope you can write more, so I can read more!

As a UK-based Red Sox fan, I found your blog on google and read a few of your other Bosox posts. I just added you to my Google News Reader. Keep up the good work. Look forward to reading more from you in the future.

As a UK-based acne sufferer, I found your blog on google and read a few of your other dermatology posts. I just added you to my Google News Reader. Keep up the good work. Look forward to reading more from you in the future.

As a UK-based Polly Pocket collector, I found your blog on google and read a few of your other doll posts. I just added you to my Google News Reader. Keep up the good work. Look forward to reading more from you in the future.

Annie Balno says:

Very nice information. Thanks for this.

will bendz says:

I really liked your blog!

hank sparrow says:

Can you provide more information on this?

Great article, trying to subscribe to your site but Im having some troubles.

Nice site! Thanks for the great post?ffff85.%d%a%d%a%d%aPeople should read this.%d%a