Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have created several web sites inside IIS7 on my server. All of them use the same ip and port, but different host names. Currently I have set the host name to www.mydomain.com.

Now my question is, how do I get my actual domains to target the different sites on my server.

Second question. Can I set my host name to only mydomain.com to make sure that all requests to that domain is handeled by the same application? Primarily, I want both www.mydomain.com and mydomain.com to work when the user types the address in their browser.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

IIS will do what you want for you.

All you need is to create A records for each domain in DNS pointing at the IP address of the IIS server. The "Virtual Servers" nature of the way IIS works means that it will look at the incoming request, and serve the site with the name matching the URL requested.

Serving the same content for two different domains (www.domain.com and domain.com are seperate domains) is done using site bindings. Note that if these are to be public websites, then you should avoid having two different domains serving the same content. It is best to redirect one domain to the other.

share|improve this answer
Thanks. Have read up a bit on DNS now, and then it all gives sense. Thanks for helping :) –  Øyvind Knobloch-Bråthen Nov 22 '11 at 7:48

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.