Would you like to learn how to install IIS and configure multiple Websites on a computer running Windows? In this tutorial, we are going to show you how to use the Host Header feature to configure multiple Websites on the same IIS server.

• Windows 2012 R2
• Windows 2016
• Windows 2019

In our example, the IIS server IP address is 35.160.86.106.

Hardware List:

The following section presents the list of equipment used to create this tutorial.

Every piece of hardware listed above can be found at Amazon website.

Tutorial Windows – IIS Installation

Open the Server Manager application.

Access the Manage menu and click on Add roles and features.

Windows 2012 add role

On the Server Roles screen, select the option named: Web Server IIS.

Click on the Next button.

IIS Installation

On the following screen, click on the Add features button.

IIS Features

On the Features screen, click on the Next button.

Windows 2012 - Features

On the Role service screen, click on the Next button.

IIS - Role Service

On the Summary screen, click on the Install button.

IIS installation summary

Congratulations! You have finished the IIS service installation on a computer running Windows.

Tutorial IIS Virtualhost – DNS configuration

Access the GODADDY website and purchase a DNS domain.

In our example, we purchased a domain named:

Copy to Clipboard

You can use any website to purchase a DNS domain, GoDaddy is just my personal choice.

Create a DNS entry pointing your website to the computer running IIS.

In our example, we created a DNS entry pointing WWW.GAMEKING.TIPS to 35.160.86.106.

IIS - MULTIPLE WEBSITES DNS

Use the NSLOOKUP command to test your DNS configuration.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Open your browser and try to access the HTTP version of the website.

In our example, the following URL was entered in the Browser:

• http://www.gameking.tips

IIS - DEFAULT WEBSITE

Congratulations! You have finished the required DNS configuration.

Tutorial IIS – Multiple Websites on the same server

Start the application named: IIS Manager.

Start IIS Windows

On the IIS Manager application, right-click on the default website.

Select the option named Edit bindings.

IIS - Host header binding

Select the HTTP option and click on the Edit button.

IIS - EDIT BINDINGS

Enter a nonexistent website hostname and click on the OK button.

This will make sure that the IIS default website is never used.

IIS - Enable host header

Create a directory to store the virtual host files.

IIS - Virtualhost directory

In our example, we created a directory named GAMEKING on the root of drive C.

Inside this directory, create an HTML file to be used as a test page.

Copy to Clipboard

On the IIS Manager application, select the folder named Sites

On the right part of the screen, access the option to Add a Website.

IIS ADD VIRTUAL HOST

On the Website configuration screen, perform the following configuration:

• Site name – Enter an identification to the new Website.
• Physical path – Select the directory where the Website files are stored.
• Type – HTTP
• IP address – All Unassigned.
• Port – 80.
Hostname – Enter the website DNS address.
• Start Website immediately – Yes.

Click on the OK button.

IIS VIRTUALHOST - ADD WEBSITE

Open your browser and enter the DNS address of the new website.

In our example, the following URL was entered in the Browser:

• http://www.gameking.tips/

The Test page should be presented.

IIS VIRTUAL HOST - WEBSITE

Repeat these steps to add multiple websites to the same IIS server.

Congratulations! You successfully configured the IIS virtual host feature.