Tag Archives: IIS

IIS Can Manage Multiple Web sites on Port 80 with a single IP address

Host Headers are the answer!

YES!  IIS can manage multiple web sites on the same port (properly port 80) without having to do extraneous configuring.  This can even be done with MOSS and WSS implementations.

I’ve always considered it to be common knowledge that ‘host headers’ could be used to allow IIS to handle multiple web sites on the same IP and port.  Lately I’m finding out that some very smart people are completely unaware of this fact, so I decided to blog about it.

Configuring it for basic site usage:

– Open IIS (Start > Run > inetmgr). 

– Expand the <server> node, and expand the Web Sites node.

iis01

– Right-Click on the web site that you want to edit and choose Properties.

– On the Web Site tab in the Web site identification area, click on Advanced.

– The top area titled ‘Multiple identities for this Web site’ will allow you to add host headers, modify IP address usage within IIS, and modify the non-SSL ports.

iis02  iis04

The host header value will cause IIS to route requests that are directed to the specific host header to that specific web site.

You can and should use this to facilitate development and production deployments within IIS.  If host headers are not used, then the only other way to assign multiple sites using the same port (80) to a single web server is to assign multiple IP addresses.  There is no reason to do that.  A single IP address can be used to route your sites and to state once more, this can be used with MOSS and WSS web applications. 

For MOSS deployments, when creating a web application you can assign a host header and MOSS will configure IIS accordingly.  If your web applications are already created and you want to host them on a new port (80) using host headers, you should be able to make the changes directly within IIS to manage this.  Make sure you leave the original entries in IIS so that no URL’s break, but you should now be able to route through IIS on port 80 to your web application.  Please post any environment specific questions and I’ll answer as I can.

Hope this helps some people out.

And please note, this does not apply for SSL (HTTPS) sites.  SSL does not support multiple sites on the same port and IP address due to the way encryption and certificates are managed.

Advertisements