tags:

views:

257

answers:

1

I want to set the hostname for a website I'm adding in IIS 7, however do I include the www in the hostname or not? because I want both www.mysite.com and mysite.com both to point to mysite on the server.

thanks!

A: 

You can set bindings for both the www and non-www variants, so both will be mapped to your site.

Note that, for SEO and Web Analytics reasons, it's usually a good idea to have only one variant (either www or not-www) used on your site. To make this work, you can set up an HTTP redirect (in IIS, in your code, or your hoster can probably enable it on their end) from all requests from one variant to your preferred variant. If you have IIS or the hoster do the redirect, then you only need to bind your site to the preferred hostname.

Justin Grant