Accidental Technologist

Musings about Entrepreneurship, Technology and Software Development

  • Home
  • About
  • Still River Software
  • Privacy Policy

Powered by Genesis

You are here: Home / IIS / Use Host-Header Routing to Host Multiple IIS Web Sites

Use Host-Header Routing to Host Multiple IIS Web Sites

October 24, 2007 by Rob Bazinet

Tweet

I have been working with Microsoft Internet Information Server (IIS) since very early on and sometimes take for granted some nice features in the current (pre-IIS7) versions.

Much of my work is from the development side of things, creating ASP.NET web sites and web services.  I do get involved in the management of those IIS servers from time-to-time.   One issue that we often face is how to host multiple web sites on the same IIS server.  There are three approaches that work, they are:

1. Separate IP address for each site hosted – this works but requires you to use a precious IP address that your hosting company may not want to give out.

2. Use different TCP port – since normal HTTP traffic uses port 80 there is nothing saying you can host your web site on a different port, say 8080.  The drawback to this is yoursite.com:8080 may have it’s port blocked by the firewall you are behind and it’s not a common port so your users may have a hard time finding it.

3. The best way, in my opinion is to use what is called Host-Header Routing, which is part of the HTTP 1.1 specification.  Host-Header Routing is simply using a single IP address in your IIS configuration for all of your web sites but differ them in the configuration by indicating their host name.

You can access this information by going to Internet Information Services and right-clicking on your website and choose Properties and go to the Web Site tab and click the Advanced button and see a screen like below:

IISAdvanced

Choose the Edit button which will reveal a dialog like this:

IISHostHeader

Simply enter your host like “www.microsoft.com” into the Host Header Name field and select OK.  You can now do the same thing for additional web sites using the (All Unassigned) IP Address but vary the Host Header Name.   This will save your IP addresses and is an nice way to host multiple web sites.

The only caveat is the browser needs to support HTTP 1.1, which almost all do today.

Technorati Tags: IIS, Host-Header Routing, Microsoft

Share this:

  • LinkedIn
  • Twitter
  • Facebook
  • Email
  • More
  • Pinterest
  • Tumblr
  • Pocket
  • Reddit

Related

Filed Under: IIS

Care about your privacy? I do and use Fathom Analytics on this site.

Fathom Analytics

Comments

  1. Ghillie Suits » Use Host-Header Routing to Host Multiple IIS Web Sites says

    October 24, 2007 at 12:13 pm

    […] Check it out! While looking through the blogosphere we stumbled on an interesting post today.Here’s a quick excerptUse Host-Header Routing to Host Multiple IIS Web Sites Posted by Rob Bazinet on October 24th, 2007 I have been working with Microsoft Internet Information Server (IIS) since very early on and sometimes take for granted some nice features in the current (pre-IIS7) versions. Much of my work is from the development side of things, creating ASP […]

  2. Ghillie Suits » Use Host says

    October 24, 2007 at 12:13 pm

    […] Check it out! While looking through the blogosphere we stumbled on an interesting post today.Here’s a quick excerptUse Host-Header Routing to Host Multiple IIS Web Sites Posted by Rob Bazinet on October 24th, 2007 I have been working with Microsoft Internet Information Server (IIS) since very early on and sometimes take for granted some nice features in the current (pre-IIS7) versions. Much of my work is from the development side of things, creating ASP […]

Recent Posts

  • How to Fix Rails Flash Rendering When Using Hotwire
  • Hotwire Fix for CORS Error when using Omniauth
  • Fix Installation of Ruby using rbenv on macOS Big Sur
  • RailsConf 2021 and the Future of Conferences
  • Fixing Out of Diskspace Errors on Amazon EC2

Categories

Services I Love

HatchBox - Easy Rails Deploys Fathom Analytics
Follow @rbazinet

Rob Bazinet
@rbazinet

  • I guess Microsoft didn’t learn from Zune - https://t.co/dvznUDGxX4
    about 2 days ago
  • This is so true! I'd love to call out some companies attempting this and making life hard on devs. https://t.co/oNayiZdKlc
    about 1 month ago
  • I’m looking for a good Mac client app to backup my Mac to my Synology NAS. Any suggestions? I’m looking for something besides Arq 7.
    about 3 months ago
  • Hotwire Course Early Access is Open https://t.co/GeW2W0HLYI
    about 4 months ago
  • The James Webb Space Telescope is an amazing engineering fest playing out in real-time - https://t.co/FlGn7LXgkY
    about 5 months ago
  • RSS - Posts
  • RSS - Comments
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.