Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have multiple websites and of course I can't run them all in port 80 so one of my websites is using port 9090.

I've registered my IP in the domain DNS server and added hostname in the site bindings. But now I can enter my website only like that: How can I make it open correct website by running

share|improve this question
What type of web site are you running just static html files or something like WordPress? My question being is the web site outside of IIS only configured to respond to or redirect to a base URL? – Bernie White Nov 6 '12 at 6:46
Also what happens if you create a new website with a single index.html and access HTTP:// – Bernie White Nov 6 '12 at 6:48
Has either of these answered your question? – Bernie White Nov 29 '12 at 8:39
up vote 1 down vote accepted

There are two main options to run a multiple web sites on a single server like you have described.

Host Header on one IP

IIS can be configured to look at the host header for an incoming request route it to the correct web site even on a single IP address.

This is done by configuring the site bindings and specifying a host name value for all websites on the same IP address. Your web sites will commonly fail to start or generate errors if you have only some of web sites on the same IP bound to a host header. See for more information.

This method does not work for HTTPS i.e. SSL/TLS encrypted. This is because the protocol itself is an encrypted tunnel between IP addresses that does not parse a host header in the tunnel establishment.

Website on individual IP Addresses

Another approach is to separate each website on a separate IP address. This may not be an option available to you for Internet facing websites because you may not have access to more then one IP address. It is great for intranet websites because you can easily troubleshoot issues from the network layer. This option will also work for HTTPS web sites.

To configure this you would:

  1. Assign an additional IP address to the operating system using network connections and then editing the TCP/IP properties on the network connection. After you have added an addition IP address it will appear in IIS to bind to.
  2. If you have any existing web sites make sure that they are not bound to the same IP address.
  3. Add or edit a site binding to the new IP address. See

Hope that helps.

share|improve this answer

It's time to take it back to the basics. You need to review the TechNet documentations on Setting up Host Headers in IIS

share|improve this answer
I did excatly what it said in the documentation. It runs on localhost when I set no host header, and when I set host header it shows 404. – Stan Nov 5 '12 at 15:55
Are you running everything on port 80 when you setup the host headers? You should be. – Brent Pabst Nov 5 '12 at 16:47
Yes, of course. I can give some screenshots displaying my configuration later. Currently I have only one website anyway. – Stan Nov 5 '12 at 17:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.