Server Fault is a question and answer site for system and network administrators. 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 have a need to support multiple websites on a single IIS 7 server. One of these websites needs to be able to support wildcard subdomains. I was hoping to use host headers for this approach but am thinking this is not possible. The site that requires wildcard subdomains won't let me use * in the host header and therefore won't respond to subdomain requests unless i set it to listen blindly on port 80. If I have that site listen blindly on port 80, it seems my other sites will not work.

It's completely plausible I'm missing a step. Any help is greatly appreciated!

share|improve this question

migrated from Oct 5 '10 at 22:37

This question came from our site for professional and enthusiast programmers.

shouldn't this be on server fault? – Keith Nicholas Oct 23 '09 at 3:28
up vote 2 down vote accepted

Give each separate website its own IP address and configure IIS to listen based on IP address rather than Host header.

Then, any single website with multiple or wildcard subdomains but at a separate IP will work with IIS listening to all incoming requests on that IP.

share|improve this answer
yup this is what i ended up doing. – Keith Fitzgerald Oct 29 '10 at 15:28
Observation: Strangely, this IP setting seems to be completely benign for me. I setup a test site with a simple text page, and it seems not matter what IP I bind it to, it always renders. Other sites, however, only refresh properly if set to "*". Makes no sense to me. :( – Chiramisu Oct 17 '12 at 22:02

Just use not *

share|improve this answer

My understanding is IIS doesnt support this. Im assuming the next best option is to use URL rewriting and set a rewrite in the global rules (not per site). I've been using IIRF with good results, and it is free. Version 2.x now has a server-level global re-write rules, then each site has its own per-site rewrite rules. I'd set something to redirect (or maybe even rewrite) * to a fixed sub, like Or even get creative and pass it as a folder like .

Not optimal solutions, but should work.

I'm really surprised we cant get iis to do regular wildcards on hostheaders. Seems pretty basic fucntionality.

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.