Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 set up several web sites on my home server (running windows 7). Lets say ive got the domain At this address im hosting some really lol stuff, but just for the kicks ive also want to have that should lead into the webclient for the mail. is hosted in c:\www\www\ and is hosted in c:\www\mail\. The default website ( is already redirected and works like a charm, but how do i config IIS 7.5 so it understands that when it gets a request like it should redirect to c:\www\mail\? is a seperate site ive created with its own physical path in IIS and it's binding is http(type) layout.localhost(host) 80(port) *(IP-address), but where do i do the actuall checking of the request and redirecting?

share|improve this question
up vote 1 down vote accepted

Your binding should be the same as address of your subdomain. should have a binding with the same address. When a browser makes a request it sends a host header "", that's how IIS knows which site to serve.

share|improve this answer
i've checked it, default web site looks like this: http(type) <blank>(hostname) 80(port) *(ip-address), mail binding looks like this: http(type) mail.localhost(hostname) 80(port) *(ip-address). IS THIS the way i should do it? – Jason94 Aug 16 '11 at 9:27
No, your hostname should be instead of mail.localhost – ZippyV Aug 16 '11 at 9:34
thank you for the explanation! :-) – Jason94 Aug 16 '11 at 10:17

Assuming you've got the site setup properly in IIS and you have the binding set to, then the last step is to setup your DNS.

If is an actual domain that you have registered, you need to modify the DNS records for and add an A Record which points to whatever IP Address your IIS machine is listening on.

For clarification, an A Record is simply a record which ties a particular domain name to an IP address. (Wikipedia list of DNS Record Types)

If you don't have access to DNS records, or if this is just for machines in your home LAN, then you can achieve the same results by simply adding an entry in your local machines' host files. The file is found at c:\windows\system32\drivers\etc\hosts. For each machine, add a line with the hostname ( and ip address of the server and you should be good to go.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .