Hosting Multiple Websites Using A Single Ip Address in IIS 6.0

March 31, 2008

504349_tft_screen_close-up_1.jpeg

If you host your site with a web hosting provider, you probably have access to a control panel that allows you to easily setup new websites. For the rest of us using our own dedicated Windows servers, we need to manually configure our servers and handle all of the administrative tasks ourselves. In this article, we will learn how to configure Microsoft’s Internet Information Services (IIS) 6.0 to host multiple websites.

Internet Information Services (IIS) allows you to map multiple websites, using the same port number, to a single IP address using a feature call host header names. To get this to work, you simply map the DNS host name of your site to the Host Header Name in IIS. For example, if your website address was www.microsoft.com, then this is the value you would want to use for the Host Header Name in IIS. This also means that if there is more than one website configured to a single IP address, you must connect to the website by using the host header name. When you try to connect to the website by using the IP address, you receive would recieve an error message becuase IIS uses the requested host name to figure out host header value it is mapped to. With all of this in mind, lets get started configuring our web server.

  1. Click Start, point to Administrative Tools, and then click Internet Information Services.
  2. Expand server name (where server name is the name of the server), and then expand websites.
  3. Right-click the website that you want, and then click Properties.
  4. The website name Properties dialog box appears (where website name is the name of the website that you selected).
  5. Click the website tab, and then in the IP Address list, select the IP address that you want assigned to this website.
  6. Under Multiple identities for this website, click the IP address, and then click Edit.
  7. In the Host Header Name box, type the host header that you want. For example, type www.microsoft.com. Add the port number, select the IP address in the list, and then click OK.
  8. In the Advanced Multiple website Configuration dialog box, click OK.
  9. In the website name Properties dialog box, click OK.
  10. Right-click the next website that you want, and then click Properties.
  11. In the IP Address list, select the same IP address that you selected before, and then click Advanced.
  12. Under Multiple identities for this website, click the IP address, and then click Edit.
  13. In the Host Header Name box, type a unique host header for this website. For example, type www.msn.com, add the port number, select the IP address in the list, and then click OK.
  14. In the Advanced Multiple website Configuration dialog box, click OK.
  15. In the website name Properties dialog box, click OK.
  16. Repeat steps 10 through 15 for each website that you want hosted on this IP address.
  17. Register the host header names with the appropriate name resolution system -for example, a Domain Name System (DNS) server or, in the case of a small network, a Hosts file.

That’s all there is to it. Your websites should now be configured to accept incoming web requests, based on their host header names. Keep in mind that you do not assign a host header name to the Default website. Many programs expect the Default website to use an IP address of (All Unassigned), TCP Port 80, and no host header name.

In this article we’ve showed you how to host multiple websites using a single IP address in IIS 6.0. Hopefully this article was helpful to you, to learn more about Internet Information Services (IIS) visit the IIS Technology center at http://www.microsoft.com/WindowsServer2003/iis/default.mspx .


About the Author

Matt Peterson is a Senior Consultant for N2 Network Solutions, a phoenix computer networking firm providing IT Outsourcing and computer repair in phoenix .

Comments

Comments are closed.

Bottom