VirtualHost with IIS 6

Posted on 2004-11-23
Last Modified: 2008-02-26
Hi folks,

I know this is easy to do with Apache but we're stuck with IIS 6.

Is there a way to do virtual hosting with IIS6?

I have and it works fine and well,

we're registering and we want this to simply remap to

How can I do this?

I'd offer more points but this is all I have right now. Sorry.

Thanks in advance.
Question by:PNdeveloper
    LVL 33

    Expert Comment

    LVL 34

    Accepted Solution

    Simply add another Host Header to the site (if you are using them, don't bother if you;re not) and register the domain name with the same IP address as the other site.

    IIS will respond to any traffic that comes in on an IP it is assigned to if it has a Host Header for that domain name (or any if no Host Header is set).

    Dave Dietz
    LVL 33

    Expert Comment

    You can host multiple sites on IIS by using either different IP addresses, host headers, or different ports.  The third one is impractical, so it's best to leave it out.  The other two options are preferred.

    Some MS articles to look at:

    Adding websites to your server -

    Creating Multiple Sites Using Host Header Names -

    Creating Multiple Sites Using Multiple IP Addresses -

    You may also want to look at this Win2003/IIS 6 tutorial -

    What you would do in the example you've given in your question is create two websites in IIS, one for and one for  When you set up the second site, instead of defining the home directory as 'A directory located on this computer' or 'A share located on another computer', you can choose 'A redirection to a URL' and input  Make sure you also check the 'A permanent redirection for this resouce' box.

    Author Comment

    Thank you very much all. Host headers is exactly what I needed. Thanks a ton to Dave Dietz and humeniuk.

    Given that the points are minimal I decided to give them to Dave since he answered first. Soon as I get more points, I'll send them your way humeniuk. I did in fact use your links to find more on the subject.

    Thank you thank you thank you.
    LVL 33

    Expert Comment

    Should;ve cut and copied from the link instead of posting the link :-0. Then my answer woudl;'ve been accpeted

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Adobe Dreamweaver CC 2015

    Adobe Dreamweaver Creative Cloud is used by web designers and front-end developers and allows you to visualize your site in real-time as you code. This course covers exam objectives for the Adobe Certified Associate (ACA) certification.

    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now