You may configure Internet Information Services (IIS) to host multiple websites using the same internet protocol (IP) address. This may be done by utilizing separate ports on the same IP address or through the use of host headers. In this example, we will configure host headers as it is a simpler solution than using a separate port.

Before we begin I would like to provide a list of prerequisites:

  • Specify the website domain names. In this example, we will use domain.com and website.com.
  • Create a folder path for each website. In this example, we will use C:\inetpub\sites\domain.com and C:\inetpub\sites\website.com.
  • Create an index.html file, or any other default document of your choice, in each of the directories above.
  • Edit the C:\Windows\System32\drivers\etc\hosts file on the local server or remote client to test the host header configuration or create DNS entries to resolve these domain names to the appropriate IP address. If not, the web traffic will be routed to public web servers hosting these domains.

With that said, let’s begin our configuration in IIS.

  1. On the Internet Information Services (IIS) Manager interface right click Sites and select Add Website….
  2. In the Add Website dialog box enter the Site name: and Physical path: then click OK.
  3. On the Add Website dialog box select Yes to add the duplicate binding. NOTE: We will change this next.
  4. Verify that the new website, domain.com, is not running.
  5. Right click domain.com and select Bindings….
  6. In the Site Bindings dialog box select the http binding and click Edit….
  7. In the Edit Site Binding dialog box enter domain.com in the Host name: field and click OK.
  8. In the Site Bindings dialog box click Close.
  9. Right click domain.com and select Manage Website > Start.
  10. Verify the domain.com website has started.
  11. Repeat steps 1-10 for website.com.
  12. Right click domain.com and select Manage Website > Browse domain.com on *:80 (http).
  13. Verify the web browser returns the index.html file you created for domain.com from the local server and remote client.
  14. Repeat step 13 for website.com.