English 中文(简体)
Setting hostname in IIS, include www?
原标题:
  • 时间:2009-11-13 17:22:28
  •  标签:
  • iis
  • hostname

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!

最佳回答

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.

问题回答

暂无回答




相关问题
Session Management with Windows Authentication

In an ASP.NET web app, using Integrated Windows Authentication, is the session tied to the windows identity? In other words, if I login (using IWA) to the app, and the app stores some "stuff" in my ...

Using Elmah with Cassini

Does anyone know if I can use Elmah with Visual Studio build-in web server(aka Cassini)? I get it working easily on IIS, but using same configuration, it doesn t work with Cassini. When I requested ...

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 ...

inetpub versus any other folder

I ve run websites out of inetpub, as well as from folders just residing on the C: drive. I wonder, are there any definitive advantages to running websites out of inetputwwwroot?

IIS 6.0 hangs when serving a web-service

I am having issues with one of our web-services. It works fine on my development machine (win XP) whether I host it as a separate application or using cassini from Visual studio. Once I deploy on the ...

热门标签