Skip to content

Setting up multiple websites and hostheaders in IIS

January 16, 2012

Problem: We have a test enviroment sonsisting of 2 websites. We need to set them up whithin IIS on the same server and navigate to them for testing purposes. Multiple websites can be setup on the same IIS by using:

a) Multiple IP addresses

b) Multiple ports

c) Host headers.

We will set up this environment using the host headers.


– Add websites to IIS

– open the fisrt website in IIS and click on the bindings link in the actions menu

– enter the address the users will enter to access this test website from the LOCAL machine (

– open the second website in the IIS and enter the address for the second website (

– open the hosts file for the local machine and add the following lines into it:

Now when the user types either address into the browsers address bar the hosts file will redirect the request to the local machine’s IIS and the IIS will open the appropriate website looking at the host headers.

Leave a Comment

Leave a Reply

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

You are commenting using your 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 )

Connecting to %s

%d bloggers like this: