How can I setup Microsoft’s DNS server to respond with an IP address when an ‘A’ record does not exist?
For example, let’s say someone goes to
something.mydomain.com
but there’s no ‘A’ record for the subdomain, something.mydomain.com. Is it possible to still have Microsoft’s DNS Server respond with a valid (default) IP for the domain? I know that other DNS providers do provide this feature but I haven’t figured it out yet with Microsoft.
Thanks in advance for your time and consideration.
Software/Hardware used:
ASKED:
May 6, 2008 7:22 PM
UPDATED:
May 7, 2008 3:48 PM
I don’t believe Microsoft DNS allows an asterisk in a host record name through the MMC DNS console. To create a wildcard A record you must create a subdomain named with an asterisk then create a blank A record in that subdomain. You can use the dnscmd.exe tool (or call the API directly).
dnscmd.exe DNSServerName /RecordAdd mydomain.com * A x.x.x.x
[If your Server is a 2000 box, you will need to enable LooseWildcarding first].
Wildcard A records are possible but using CNAME wildcards are usually a better way to go. Create an A record for all something.mydomain.com requests, then create a CNAME *.mydomain.com which points to it.
Keep in mind the HTTP HOST header will not get updated once it’s resolved. If madeup.mydomain.com gets forwarded to defaultsite.mydomain.com the header will remain madeup.mydomain.com. You will probably want to create a virtual host which redirects all ‘unknown’ hostnames to defaultsite.mydomain.com.