Forum Moderators: open
Why does Google treat domain.com and www.domain.com differently?
Our DNS is on an NT box. I was just on the phone with one of the techs and we cannot figure out how to force the browser to bring up the www. when someone just types in domain.com. We've always set up new sites to resolve to both just in case the user left off the www.
Now that I see Google assigning different PR based on the domain, this is a practice we need to change. Can someone shed a little more light on this for me? If so, can someone familiar with DNS on NT guide us in the right direction to force the www.
Any help would be greatly appreciated, thanks!
Sounds like your DNS is good-to-go. Just redirect users coming in on whichever domain you
consider to be "non-standard" over to the "standard" domain. You pick which one you prefer.
Use a permanent 301 redirect, and with luck, the existing PR of both domains will add together
(remember that PR is logarithmic, though) and you'll get a slight boost on that PR6...
I'm not sure how this is done on an NT server, but your're looking for a redirect method similar
to that descibed in the "RedirectPermanent" and "using mod-rewrite in .htaccess" posts for Apache
server.
HTH,
Jim
Anyway, the problem you're seeing with Google is separate. My site (and most others I see) is not even indexed without the www. You most likely have incoming links pointing to both [yousite.com...] as well as [yoursite.com,...] and both are indexed by Google. Since there are less links without the www, the PR is lower.
I suspect you can check through Google who is linking to you without the www and request they change it, and help build the PR of the www address. If not, in the future just make sure links to you contain the www.
Sorry, I'm new and don't know how to put quotes from replies in the nice little box <g>.
Anyway, this can be done with NT (well, in my case, 2000 Server, but I'm sure it'll still work on an older NT). I just set up a coupla test domains to try it :)
Take a look at rain-forests.com It *should* automatically redirect to www.rain-forests.com (it does in my browsers).
What you have to do is setup a second "New Web" under the IIS control panel, using the same IP as the "www" version, but enter the www-less version where it says "host headers". Finish setting up the domain, then right click->properties, then choose the Home Directory tab. Click the permanent redirect box, AND the "exact URL" box. The permanent redirect alone won't work, you have to check both boxes.
Now, those descriptions are just from memory (admittedly fresh, since I just did it <g>), but if you need them to be more explicit, I can do a walk-thru for you (or your techie).
Take care,
Steve
[edited by: ciml at 3:24 pm (utc) on Aug. 8, 2002]
[edit reason] Just a de-link. [/edit]
if Request.ServerVariables("HTTP_HOST") = "rain-forests.com" then
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.rain-forests.com"
end if
Having to make 2 websites in IIS for each hosted site takes time and adds to the load on the server, not to mention clutters the manager. This little snippet is a much easier fix.
Actually, f00sion is my programmer wanting to resolve this issue as much as I. Bluesplinter, I was on the phone with my tech at the same time you posted and we were going to give your method a try. We did a server header check on rain-forests.com and it returns this...
Server Response: http //rain-forests.com
Status: HTTP/1.1 301 Error
Location: http //www.rain-forests.com
Server: Microsoft-IIS/5.0
Content-Type: text/html
Content-Length: 150
When we do our 301's using asp or assigning a unique IP, the header returns this...
Server Response: http //www.domain.com
Status: HTTP/1.1 301 Moved Permanently
Server: Microsoft-IIS/5.0
Date: Wed, 07 Aug 2002 23:54:12 GMT
Location: http //www.domain.com/
Content-Length: 780
Content-Type: text/html
Ours is returning a 301 Moved Permanently message and yours is returning a 301 Error. I'm not sure what is going on there. Is it possible that the method you've outlined is returning an actual error or is a 301 a 301 no matter what it reads for the status?
If most folks already go to the www version, then you're just subjecting them to endless, needless HTTP_HOST checks, every time they load a page. The IIS version, at least, only kicks in for visitors who hit the www-less version, and then only once.
However, www or not-www doesn't matter to me, so if pageoneresults would prefer the ASP method, that suits me plumb to death :)
Take care,
Steve
Hmm, dunno. I'll see what I can find out. FWIW, I have used a second IP before, but out of curiousity wanted to see if I could do it with one IP.
Steve
That is the part that has been baffling us. How can we have multiple 301's using IIS and one IP address. We've got a block of 255 IP's and they are diminishing quickly. We'll be forced to start doing virtual IP stuff here shortly!
This sounds fairly complicated just to take care of the www. issue. There has to be an easier way. There just has to be!
> so if pageoneresults would prefer the ASP method, that suits me plumb to death.
Oh no, not at all. Since f00sion is an asp guru, that is his quick solution which doesn't work in my scenario because we have a .htm for the index and I just don't feel comfortable inserting any asp code where I don't have to. I know this can be done from the server side and we just need to find out how.
If what you've outlined above works and is the proper way to do this, than that is what we will do. My only concern now is the 301 error as opposed to 301 moved permanently. The extra work on the backside is about as much time as it would take to do the asp.
> If most folks already go to the www version, then you're just subjecting them to endless, needless HTTP_HOST checks, every time they load a page.
Sounds like a valid argument, hey f00sion, what's up with that?
> Anyway, the problem you're seeing with Google is separate. My site (and most others I see) is not even indexed without the www. You most likely have incoming links pointing to both http //yoursite.com as well as http //www.yoursite.com, and both are indexed by Google. Since there are less links without the www, the PR is lower.
There are no links out there without the www. We've been pretty up front with how we'd like our incoming links formatted and I believe all have followed the instructions. I'm not sure where that PR is coming from or how it factors into the www.
Anyone else care to comment on the www. vs. the no www. scenario?
jdMorgan, didn't mean to leave you out either. The more I hang out here at Webmaster World, the more I want to be an Apache! Where's that damn peace pipe? ;)
Why does Google treat domain.com and www.domain.com differently?
Because they're different hosts. Despite what many people seem to think, there is no commandement, ammendment, law of nature, or other rule that requires the two hostnames resolve to the same content, or even the same physical server. "www.example.com" is a convention, not a specification. Having different content at each address is weird, but it's possible and legal.
That's interesting. You mean to tell me that I could have one site residing on adomain.com and another on www.adomain.com? I've been researching this issue for the last couple of hours and recall reading something to the effect of additional naming without the www.
So, what does this mean in the overall picture? Should we be covering our bases and making sure that any requests for domain.com or www.domain.com resolve to www.domain.com? Or, should we just resolve to www.domain.com and let the other domain.com request return the standard browser error?
I *guess* my server just has "Error" as the response string instead of Moved Permanently. I don't know why, or how to verify (or change) that, though I will continue to investigate. I checked it by using different IPs, and still got "301 Error", so it's not a problem with using the same IP. And, it *is* giving the "correct" location, so I assume (hope) that the "301" portion is the only thing that's important.
At any rate, since your server is returning 301 Permanent Redirect, you look to be in good shape.
Steve
Not yet! We're still faced with the issue of how to set up IIS5 so all requests for domain.com permanently redirect to www.domain.com. I'm hoping that your solution above is the answer to this issue and possibly one other that we've not talked about.
Okay, I know there are plenty of lurking gurus, how about decloaking for a moment and offering some feedback. Is the above method the best way to deal with the current www. vs no www. situation?
Hey Xoc, thanks!
Redirect domain.com to www.domain.com [xoc.net]
Bluesplinter, are these the same steps you described above? I haven't had a chance to compare them and I'm not the techie type! Like you can't tell, huh? ;)
Yep, though they left out a few steps. You *must* enter a host-header when you first create the "New Web site" entry in the IIS manager. Otherwise you'll get a "duplicate name exists on the network" error.
Of course, my initial instructions also had a mistake in them <g>. You *don't* need to check "exact URL entered above", since that would cause all requests to go to the home page, regardless of the original requested page.
Steve
>> If you don't want to do it with asp then you can do it with any other server side scripting language as well; that was just an example. <<
Sure, and if I was using ASP (or another server side language), then it'd be a tougher call. I think I'd still fall on the side of letting the IIS manager handle it, but only because then I'd never have to worry about it again, where I'd always worry about changes and redesigns to my site, and having to make sure I didn't break any scripting. The IIS snap-in way is set-it, forget-it.
But I didn't mean to disparage other methods. I have been known to use server-side scripting for other types of redirection instead of using the IIS snap-in. Either is valid :)
Take care,
Steve
The only thing I'm concerned about is the status code. While most others read Moved Permanently, IIS uses the term Error. Is there a difference between 301 Moved Permanently and 301 Error?
Server Response: http //domain.com
Status: HTTP/1.1 301 Error
Location: http ://www.domain.com/
Server: Microsoft-IIS/5.0
Content-Type: text/html
Content-Length: 153
YES. Technically www.adomain.com is a subdomain of adomian.com. Weird to have different things at both, but it can and has been done.