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

  • Social Media Times Are Changing
  • It has certainly been a long time…
  • 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

Categories

Services I Love

HatchBox - Easy Rails Deploys Fathom Analytics
Follow @rbazinet

Rob Bazinet
@rbazinet

  • Great little utility https://t.co/6AgboJv6oI
    about 22 hours ago
  • Funny watching the hate to show up in my time line for ChatGPT. People getting defensive about it.
    about 4 days ago
  • I just backed The SaaS Playbook, by Rob Walling on @Kickstarter https://t.co/1FpTWN9c9v
    about 4 days ago
  • This looks like an interesting project. I need to dig in a bit. https://t.co/gacEX9AmEn "Phlex — fast, object-orie… https://t.co/4AUL0Z0SBl
    about 5 days ago
  • I attempted to use ChatGPT today and asked a couple questions it couldn’t answer. I thought it was a magical black… https://t.co/uJGw0CgUAv
    about 5 days ago
  • RSS - Posts
  • RSS - Comments
Find me on Mastodon