Wildcard Host Header Binding And Subdomains with IIS7

DNS, IIS Add comments

Like its predecessors, IIS7 does not support wildcard (catch-all) binding or wildcards for host names, see this discussion for the state of things and how the much requested feature didn’t make it into the II7 release version as it stands. So, if you try to add *.yourdomain.com as a host name in IIS 7 you will get this warning:

The specified host name is invalid. The valid characters are ...

There is only one “workaround” at the web server level and it requires a dedicated IP address for the particular site:

Set up a wildcard host record in DNS: right-click the zone yourdomain.com in DNS Manager>>New Host (A or AAAA)>>enter asterisk as wildcard and the dedicated IP address:

New Host for wildcard binding in DNS 

Then create you site in IIS without any host name:

image

This way DNS effectively takes care of the mapping of the URLs, throwing everything at the bound IP address which is pointing to your site. Here’s hoping that IIS will someday catch up with Apache and allow more flexible wildcard mapping of host names.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

3 Responses to “Wildcard Host Header Binding And Subdomains with IIS7”

  1. Asteptals Says:

    Подскажите шооблончег под Wordpress 2.6.2, чтобы был похож на ваш dirk.net.

    Заранее благодарю)

  2. DNS Server, IIS7 - Server Support Forum Says:

    [...] Hallo, Ich habe das selbe problem: Dirk.Net Blog Archive Wildcard Host Header Binding And Subdomains with IIS7 Alle Requests *.name.dyndns.com werden auf meinen Server weitergeleitet, wenn ich einer Site einen [...]

  3. Robert Rawlins Says:

    Thanks for writing this up, I’ve been looking into this today and find it so frustrating that despite what seems to be a large community backing for the feature M$ still haven’t got around to building something in.

    Cheers,

    Rob

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in