Did you find this useful?
Socialize it today.

Configuring Wildcard DNS Records

Friday, October 28, 2011

There are instances in which a DNS administrator needs to have all hostnames, or just non-existent ones for a zone return the same IP address back to the DNS resolver (DNS client). This can be easily addressed with a wildcard DNS record. This is a record in a DNS zone that will match requests for non-existent domain names. A wildcard DNS record is specified by using an asterisk (*) as the left most part of a domain name, i.e. *.company.com. Here is an example of a wildcard record found in the DNS file.


This wildcard DNS record will cause all DNS lookups on the domain name for host records ending in company.com that do not exist to return a value of back to the DNS resolver.

There are limitations when using wildcard DNS record. Asterisks located in other places in the fully qualified domain name (FQDN) will not work as a wildcard. For example, neither host*.company.com nor www.*.company.com work as wildcard DNS records.

Creating a Wildcard record in Windows DNS

To create a wildcard DNS record using Windows DNS, open the DNS Admin console, and navigate until you expand the desired zone. Create a new host (A) record. The name of the record will be “*”, without the quotes, and then provide the IP address that you wish to resolve all non-existent records for. You can do this for other types of records as well, such as MX.

When using Microsoft Windows 2000 DNS servers, the console will not allow you to use this exact procedure. There are a few ways to work-around this issue.

Using the DNS Admin Console (Windows 2000)

  1. Right-click on the domain name in the list of domains and choose "New Domain".
  2. Type in "*", without the quotes for the domain name.
  3. Select the new sub-domain that was created, called *.
  4. Right-click it and choose "New Host".
  5. Enter the IP address to associate with the wildcard domain.
  6. Leave the host name blank.
Using Dnscmd.exe

Dnscmd is one of the tools in the Windows 2000 Support Tools package. To install the Dnscmd command-line tool on your computer, run the Setup.exe file that is located in the \Support\Tools folder on the Windows 2000 Server CD. To create the wildcard character record, type the following command at the command prompt, and then press ENTER:

dnscmd servername /recordadd zonename * A IPAddress

In this command, servername is a placeholder for the name of the DNS server, zonename is a placeholder for the zone name where the record will be created, and IPAddress is a placeholder for the address that the wildcard character record must point to when the DNS server reads the record. The /recordadd option is used to add a new record to the zone. The A option specifies the host address resource record.

Please help us spread the word by socializing it today!

email contact us

Did you find something wrong with the information on this page? Please take a moment to report it to us so that we can continue to improve the quality of the information on this site. Click here to report an issue with this page.

Recommended Books & Training Resources

MCITP Windows Server 2008 Enterprise Administrator: Training Kit 4-Pack: Exams 70-640 70-642 70-643 70-647 Windows Server 2008 R2 Unleashed