Forum Moderators: phranque

Message Too Old, No Replies

Resolving domain without www

         

meowmix

9:32 am on Oct 12, 2004 (gmt 0)

10+ Year Member



Our site is hosted on an Apache server. If someone types in our domain without the "www", we would like mydomain.com to resolve to www.mydomain.com.

Reading through other threads here, it looks like the recommended way of doing this is with a server alias.
But isn't there a potential issue with Google interpreting this as two sites, i.e., duplicate content?

Why not use a 301 permanent? Our ISP did this, and it's working, but I want to make sure we're doing it the right way.

jdMorgan

2:41 pm on Oct 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



meowmix,

Welcome to WebmasterWorld!

> Why not use a 301 permanent? Our ISP did this, and it's working, but I want to make sure we're doing it the right way.

You cannot use a 301 redirect until the server knows how it should handle the www-less domain. That's what the alias is for. After the server is told what to do with requests for the www-less domain, then you can implement a 301 to redirect requests for non-www to www, thus avoiding duplication issues.

From what you wrote above, I'm not sure what your host did -- set up the alias or implemented a 301, but you can easily check the results using the WebmasterWorld server headers checker [webmasterworld.com]. Request for your "home page" in the www domain should return a 200-OK response, and requests for the same page in the non-www domain should return a 301-Moved Permanently response.

Jim

meowmix

9:47 am on Oct 13, 2004 (gmt 0)

10+ Year Member



Thanks Jim. This worked great!