Windows – Multiple websites (IIS), one public IP, and domains names with wildcard

iis-7windowswindows-server-2008

I have the following scenario:
One domain (mydomain.com) that I want to point to 3 different IIS websites depending on the subdomain provided.

For instances:

  1. www.mydomain.com should go to WEBSITE1
  2. [*].mydomain.com should go to WEBSITE2
  3. [*].admin.mydomain.com should go to WEBSITE3

This is hosted on a Win 2008 server and I have only one public IP address.

What would be the most feasible solution for this?

Thanks a lot.

Best Answer

IIS doesn't support wildcard host headers. You will have to specify the host header for WEBSITE1, and you could set the set up WEBSITE2 as the default site, which would catch any unspecified subdomains, but for WEBSITE3 you will have to add the host headers individually to your site.

Related Topic