1

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: http://website.com:9090. How can I make it open correct website by running http://website.com?

4
  • 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? Nov 6, 2012 at 6:46
  • Also what happens if you create a new website with a single index.html and access HTTP://website.com/index.html Nov 6, 2012 at 6:48
  • Has either of these answered your question? Nov 29, 2012 at 8:39
  • How did you get solution? I have the same issue subdomain.domain.com:5000 is ok, but I want subdomain.domain.com for a website in IIS using port 5000.
    – Kiquenet
    Nov 6, 2017 at 9:20

2 Answers 2

2

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

Update: Server Name Indication (SNI) changed support for this, allowing supported browsers/servers to access/host multiple TLS protected sites on one IP using host headers to separate them.

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 http://technet.microsoft.com/en-us/library/cc753195%28v=WS.10%29.aspx 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 http://technet.microsoft.com/en-us/library/cc771629.aspx

Hope that helps.

0

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

3
  • 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.
    – sed
    Nov 5, 2012 at 15:55
  • Are you running everything on port 80 when you setup the host headers? You should be. Nov 5, 2012 at 16:47
  • Yes, of course. I can give some screenshots displaying my configuration later. Currently I have only one website anyway.
    – sed
    Nov 5, 2012 at 17:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .