Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to do something that seems to be very basic (and obvious), but it is not working so maybe I'm not implementing the idea correctly and that's why I need your help.

I have a web server with IIS7 (if it works only in IIS7.5 I also have it available) with a Website configured to port 80 and also with a SSL certificate configured to port 443.

Under this website I have two Applications folders running a .NET app each. Something like the tree below:

- ServerName
-- Sites
--- MyAppsWebSite
---- ApplicationFolder1
---- ApplicationFolder2

I'm organizing the server like this so I won't have any application running on the root on the website to avoid confusion and configuration sharing due to inheritance of configs.

What I need to do is have one subdomain mapped to each application of this website. Something like this: -> ApplicationFolder1 -> ApplicationFolder2

However as far as I know I can only map a subdomain to the specific website (using host names) and not to a application so I'm not being able to make it work.

One possibility would be to create one website per application, but then I would not be able to use the SSL certificate since we cannot have two websites sharing the same port (80/443).

Is there a way this could be done in IIS or am I missing something and trying to do something impossible?


share|improve this question
up vote 1 down vote accepted

You're trying to do something impossible!

Actually, not impossible at all, but not possible with your current certificate. Keep in mind that the key party that's going to see the names is the client. You're essentially describing the layout you want the clients to see, and that's going to determine how you can configure the server. You can't ask the server to "just treat this directory as a website" because that's what a website is - it's a namespace corresponding to a hierarchial group of directories, and you've described yours as site/directory ; site/site doesn't work from a URL perspective.

So: Yes! You'll need to create actual Website objects for those hostnames, probably using Host header support, and point them at the application directories directly. This'll Just Work with HTTP, but SSL is trickier.

This means that if you only have one IP address, you'll need a certificate with SAN (Subject Alternative Name) support and an entry for each name the server will respond to, or a wildcard certificate.

With those implemented, you can directly edit the configuration to add the SSL host header bindings in - I don't think the GUI lets you (might be mistaken there).

You can also implement some form of app proxy (ARR;ISA;TMG;UAG;Squid;Apache;etc) to convert requests for to , but the certificate requirements for that proxy will be the same.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.