« Previous Next »

Answered Thread: Subdomains Setup in IIS7

Last post 11-02-2009 1:24 AM by qbernard. 6 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (7 items)

Sort Posts:

  • 09-11-2008, 5:25 PM

    Subdomains Setup in IIS7

    I have a server that has a single IP address bound to it and right now, just one domain pointed to it.

    What I need to do is be able to do this....

    • app1.mydomain.com --> should be application #1
    • app2.mydomain.com --> should be application #2
    • app3.mydomain.com --> should be application #3

    I can put any of these urls into a browser and I get sent to the default IIS7 page.  We used to do this in IIS6 using Host Headers, but I can't figure out how to get this to work properly in IIS7.

    We don't want to do a redirect of app1.mydomain.com to www.mydomain.com/app1, we want application #1 to load and the url to remain app1.mydomain.com.

    All three sites are ASP.Net 3.5 web applications that actually run perfectly when we go to www.mydomain.com/app1.

    What am I missing here? We are running Windows Server 2008 and IIS 7.0.

     

    Michael De Lorenzo
    -------------------------------
    www.delorenzodesign.com ..:::.. delorenzodesign.blogspot.com
  • 09-11-2008, 5:46 PM In reply to

    • HSeiler
    • Top 75 Contributor
    • Joined on 06-10-2002, 8:41 PM
    • Posts 74

    Answered Re: Subdomains Setup in IIS7

    Use “Site Bindings” to specify host names for sites. In IIS Management Console select a site, then on right side under actions select Bindings…. In the Site Bindings dialog select the http binding and click Edit… here you can set the URL for that site.

    Henry Seiler
    IIS Deployment
  • 09-11-2008, 11:48 PM In reply to

    Re: Subdomains Setup in IIS7

    I must be missing something else here. 

    Michael De Lorenzo
    -------------------------------
    www.delorenzodesign.com ..:::.. delorenzodesign.blogspot.com
  • 09-12-2008, 1:24 AM In reply to

    Re: Subdomains Setup in IIS7

    I think I'm close to figuring this out.  Do the subdomains need to be setup as "A Records" with my DNS host?

    What I have configured now, I think it might be working but I'm not sure, is...

    4 Websites in IIS

    1. app1.mydomain.com
    2. app2.mydomain.com
    3. app3.mydomain.com
    4. Default Web Site

    I've edited all their bindings to be:

    • Type: http
    • IP Address: All Unassigned
    • Port: 80
    • Host name: app#.mydomain.com 

    The "Default Web Site" has all the "default" settings as far as the bindings go.

    Does this sound correct to anyone out there?

    Michael De Lorenzo
    -------------------------------
    www.delorenzodesign.com ..:::.. delorenzodesign.blogspot.com
  • 11-01-2009, 12:27 PM In reply to

    • Astralis
    • Not Ranked
    • Joined on 09-02-2007, 12:03 AM
    • Posts 3

    Re: Subdomains Setup in IIS7

    I've wondered the same thing. It would be nice if someone could give a solution.
  • 11-01-2009, 8:34 PM In reply to

    Re: Subdomains Setup in IIS7

    You can do a couple things. 

    1) create a wildcard dns mapping pointed to a single ip address to your server, then use host-headers on each website, in your case 1 IIS site for each sub-domain

    2) You can create an A record in DNS for each sub-domain pointing to an ip address hosted on your server.  Creating individual sub-domains records is more administrative overhead, but is a technical solution.

    http://support.microsoft.com/kb/190008  (although this applies to IIS 5, the concept is the same)

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield


    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 11-02-2009, 1:24 AM In reply to

    Re: Subdomains Setup in IIS7

    IIS 7 Host Header
    http://technet.microsoft.com/en-us/library/cc753195(WS.10).aspx

    You can use appcmd to configure it as well.

    Cheers,
    Bernard Cheah
Page 1 of 1 (7 items)
Microsoft Communities