Hosting several domains on one server using IIS 7

0

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.

Øyvind Bråthen

Posted 2011-11-16T08:45:00.103

Reputation: 219

Answers

1

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.

Paul

Posted 2011-11-16T08:45:00.103

Reputation: 52 173

Thanks. Have read up a bit on DNS now, and then it all gives sense. Thanks for helping :) – Øyvind Bråthen – 2011-11-22T07:48:41.360