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

2 thoughts on “IIS Can Manage Multiple Web sites on Port 80 with a single IP address”

  1. I knew this was possible but I’m running into a problem. I have a couple of webcams that I want to access all on port 80 via host headers in IIS. I’m not getting it to work since the redirect to the internal IP address does not work. IIS sends the IP address to the browser and from there it tries to find the IP address internally. Since that person came from outside, most likely he doesn’t have that IP address so it errors out. I tried to do it via a shared folder but it seems that there is no shared folder on the webcam.

    Can you maybe help me?

    Thanks,

    Koen Pruim

    1. Is this an internal network or something you want to access over the Internet? IIS shouldn’t be returning the IP address unless that’s how you’re calling it. You’ll need host headers, and then you’ll need DNS entries or host file entries that will convert the names that you use in the host headers into the server’s IP address. If it’s coming from the outside, you’ll need public DNS entries or adjust hosts on the calling machine. If you give me the scenario completely, I can spell it out for you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s