SelAromDotNet
SelAromDotNet

Reputation: 4815

Setting hostname in IIS, include www?

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!

Upvotes: 0

Views: 9298

Answers (1)

Justin Grant
Justin Grant

Reputation: 46673

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.

Upvotes: 1

Related Questions