Monday, January 19, 2009

Add DNS Alias (CNAME) on command line using dnscmd

The following shows on how to add a DNS alias (CNAME) resource record in a DNS Zone
for a domain or child domain (sub domain) using the command dnscmd.exe.

1. Assume your DNS Server Host name is "dnsserver", DNS zone is "", hostname for which alias is created is "" and name of the alias is "myalias".

2. Verify in the dns manager console diagram the dns zone "" and dnsclient host A type records exits.

2. Now run the following command to create CNAME DNS alias "myalias"

dnscmd dnsserver myalias CNAME

After running the above you can ping the alias "myalias" as shown in the below diagram
Ping myalias
3. The CNAME resource record is can be aged and scavenged. This can be done using /Aging option as shown below. If this parameter is omitted, then the resource record remains in the DNS database unless it is manually updated or removed.
dnscmd dnsserver myalias /Aging CNAME

4. The following diagram explains creating alias with aging option.
5. Also CNAME (Alias) Resource Record modification permissions can be given to all users using the option /OpenAcl. If this parameter omitted, then only administrators of the DNS server can modify the new Alias record.
run the command shown below to create CNAME with OpenAcl option.

dnscmd dnsserver myalias /Aging /OpenAcl CNAME

The following diagram explains Adding CNAME (alias) with OpenAcl option.


fifi said...

You have a wonderful site. Excellent blog post! Isn’t it a wonderful feeling to share to others what we have learned? Keep on sharing! :)

sarah lee said...

I really enjoyed reading your article. I found this as an informative and interesting post, so i think it is very useful and knowledgeable. I would like to thank you for the effort you have made in writing this article.

Leslie Lim said...

You have done a great work. Thanks for making this blog. You helped me a lot on my research topic. Keep it up guys!

Design by infinityskins.blogspot