« Previous Next »

Answered Thread: Setting up host header

Last post 10-19-2009 1:38 PM by tomkmvp. 5 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (6 items)

Sort Posts:

  • 10-19-2009, 9:53 AM

    • EssCee
    • Not Ranked
    • Joined on 05-13-2006, 3:25 PM
    • Posts 11

    Setting up host header

    Server: WS2003 with IIS + all updates 

    Ive configured DNS so that when a user types something.com it automatically forwards to our server.

    The server it forwards to has IIS installed with two sites. One is the default and other is something.com using port 1234 (example).

    What i would like to do is for the user to type something.com and it forwards to something.com:1234 and not the default 80 port (which current displays the default page for IIS (Under Construction)).

    Ive read around and its suggested to setup host header and this should do the trick. So i opened up the default site > right click properties > Web Site > Advanced > Add entered:

    IP Address: Unassigned
    Port: 1234
    Host Header Value: something.com

    This still doesnt work. It still displays the default IIS Under Construction page. I even flushed DNS and registered it which does the same thing. I would like to have so it automatically forwards somthing.com port 1234 by IIS and not DNS.

    How could this be done?

    Thanks in advance.

  • 10-19-2009, 10:16 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 10:27 AM
    • Central NJ
    • Posts 6,254
    • IIS MVPs

    Re: Setting up host header

    Host headers work irrespective of ports.

    Why do you want to use port 1234?

  • 10-19-2009, 10:25 AM In reply to

    • EssCee
    • Not Ranked
    • Joined on 05-13-2006, 3:25 PM
    • Posts 11

    Re: Setting up host header

    The default port (80) is used by other applications. So i would like something.com to go to an IIS site on a separate port - this doesnt happen at present??

    Please note, port 1234 is just an example for this thread purpose.

  • 10-19-2009, 10:31 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 10:27 AM
    • Central NJ
    • Posts 6,254
    • IIS MVPs

    Re: Setting up host header

    If you're using host headers then you do not need to use an alternate port.

    As long as the combination of IP Address, port number, and host header is unique for each site then it will work.  Make sure you assign a host header for the original site and you will then also be able to run the something.com site on port 80.

  • 10-19-2009, 11:00 AM In reply to

    • EssCee
    • Not Ranked
    • Joined on 05-13-2006, 3:25 PM
    • Posts 11

    Re: Setting up host header

    I just want to clarify if were on the same lines as i think we may have our wires crossed or i could have misunderstood you.

    I have a server using IIS on port 80. So when a user types

    http://server

    this displays the default IIS homepage (Under Construction).

    I have a second IIS site using port 1234 on the same server. When a user types

    http://server:1234

    this displays my site.

    Within DNS i set it up so when a user types http://something.com it displays the default IIS page (internal address is http://server). This is NOT what im after.

    Im after, the user entering http://something.com and it displays my site (internal address is http://server:1234).

    I read that host headers can do this for me?? So i configured the default IIS web site with

    IP Address: Unassigned
    Port: 1234
    Host Header Value: something.com

    Now if the user types http://something.com im hoping for it to go to my site and not the default under construction page.

    Am i using Host headers in the wrong way or is this not possible?

    Thanks again

  • 10-19-2009, 1:38 PM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 10:27 AM
    • Central NJ
    • Posts 6,254
    • IIS MVPs

    Answered Re: Setting up host header

    You have two sites.

    Your original site is at http://server/.  Go into the IIS MMC and set a host header for this site as "server".

    You have a second site setup at http://server:1234/. Go into the IIS MMC and set a host header for this site as "something.com" and change the port assignment back to 80.

    So now your two sites are like this:

    Default site
    IP Address: All unassigned
    Port: 80
    Host Header: server

    New site
    IP Address: All unassigned
    Port: 80
    Host Header: something.com

    You can now browse to http://server/ and http://something.com/ and get the two different sites.

Page 1 of 1 (6 items)
Microsoft Communities