Forum Moderators: open

Message Too Old, No Replies

http://www and http://

with or without the www

         

sirkei

11:39 am on Feb 20, 2005 (gmt 0)

10+ Year Member



Hi all,

I knew i saw this thread somewhere but coudnt locate it. Sorry for repost. But i just wana know whether is it an important SE issue to redirect from http:// to [www....] I knew that these two pages are different from Google's point of views or maybe other SE too.

Recently, i found out that some sites are linking to me using http:// without the www. When i asked for their change of linking url, no response received. Well, i am gladly happy that people will link to me but do i need to redirect the http:// to [www....] in order to get more advantages in SE point of view?

If it is important, how do i do that? Meta refresh tag? Mod rewrite? or any other suggestions? Comments much appreciated. Thanks.

bakedjake

6:02 pm on Feb 21, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



301 the non-www version to the www version and you'll be fine.

Stefan

6:14 pm on Feb 21, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could stick this in your .htaccess

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST}!^www\.example\.org
RewriteRule (.*) [example.org...] [R=301,L]

I got that from JD in the Apache forum a while back. It works. Check it after you try it though, in case I messed up something when I examplified.

sirkei

8:09 pm on Feb 21, 2005 (gmt 0)

10+ Year Member



Thanks for comment. I tried the code you gave me and it is not working. All i did is replace the example and org to mydoamin and com. Something goes wong here?

sirkei

12:52 am on Feb 22, 2005 (gmt 0)

10+ Year Member



Ok got it work searching previous threads. The code should be like this for http:// to [www....] :-

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain\.com
RewriteRule ^(.*) [mydomain.com...] [L,R=301]

incrediBILL

1:08 am on Feb 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Your web host should have both domain.com and www.domain.com in their DNS.

If they didn't do it by default, ask them to fix it as trying to do work arounds for web hosting 101 is silly.

Stefan

4:30 am on Feb 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Glad you got it sirkei. The code should have worked as posted though, once un-examplified. Anyway, the Apache forum is the place to check on that stuff... the moderator is a true star, (but don't bug him too much).


Your web host should have both domain.com and www.domain.com in their DNS.

That's not the issue. In fact it's more part of the problem. You only want one version to show, not both.

incrediBILL

6:05 am on Feb 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That's not the issue. In fact it's more part of the problem. You only want one version to show, not both

stefan, 'splain it to me....

I've always had both www and plain domain, never redirected, never saw any negative impact on the SE, why would it make a difference?

Stefan

2:40 pm on Feb 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Although some claim that G and the others are bright enough to sort things out when they see two versions of a site, with and without the www, in my experience this isn't the case.

About two years ago, I inexplicably had a couple of main pages go missing in the serps. After much figuring out of things, I realized that they had been linked to without the www. G saw the two versions of these pages as dupe content and booted both. I took care of things by forcing one version and they came back after a couple of months.

As to why it's at times a problem, and other times not, perhaps it depends on the PR of the site linking to the wrong version. I'm really not sure. Anyway, for the time it takes to stick some code in the .htaccess, why not do it and avoid potential problems. Keep in mind that if G comes in on any page without the www, and the internal links are relative, it can follow right through the entire site and think there are two versions of every page. Then, you can wind up with the mess right through the whole works.

incrediBILL

4:07 pm on Feb 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




Gotcha - never new the www form could cause that kind of trouble.

I had a similar situation when I started with a .NET domain name and eventually bought and switched to the .COM

Google actually seemed to sort this one out OK, but Yahoo/Inktomi and MSN went nutty and either duplicated .COM pages or ignored it altogether and insisted .NET was still the correct domain. So I have seen what you're talking about, just in a different way.