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 need to add a "Site Mapping" on IIS 7.5 to accept domains that meet some wildcard, for example: I need some web site to be mapped to the subdomain:


That means: and so.

share|improve this question
You need to add more detail to prevent this question being closed. Have you tried to make this work? What did you do? What was the result? Error messages? ServerFault isn't suited to "spoonfeeding" type questions of the "Tell me how to do X" variety. – ThatGraemeGuy Mar 27 '12 at 14:53
So... you want to display the exact same content as Or do you need to differentiate between the subdomain host headers? – Mathias R. Jessen Mar 27 '12 at 14:55
Yes, that is what i want, and i will differentiate between them using my server side code. – Mohamed Sakher Sawan Apr 2 '12 at 8:29
up vote 2 down vote accepted

Unlike Apache, IIS 7.5 does not natively support wildcard bindings like you have described when using name based hosting.

You could switch from name based hosting to IP based hosting, and dedicate 1 IP to this website. This isn't always a great utilization of IPs.

That being said, you could achieve the desired result using URL Rewrite using a rule that looks for * and rewrites it as a request for

<rule name="CustomRule" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
  <match url="*" />
  <action type="Rewrite" url="{R:0}" />
share|improve this answer

Setup a wildcard DNS entry that resolves any host to a particular IP address (dedicated) and set that IP on the bindings. Hopefully someday, IIS will have this feature.

share|improve this answer
Here you need to a new dedicated IP? – Mohamed Sakher Sawan Apr 7 '12 at 16:24

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.