A Canonical Name record (abbreviated as CNAME record) is a type of resource record in the Domain Name System (DNS) used to specify that a domain name is an alias for another domain, the “canonical” domain. All information, including subdomains, IP addresses, etc., are defined by the canonical domain. CNAME record points domain or subdomain to the IP address of the destination hostname. So, if the IP of the destination hostname changes, you won’t need to change your DNS records as the CNAME will have the same IP.
Add an alias (CNAME) resource record to a zone using the Windows interface
Open DNS Manager.
- In the console tree, right-click the applicable forward lookup zone, and then click New Alias.
- In Alias name, type the alias name.
- In Fully qualified domain name (FQDN) for target host, type the FQDN of the DNS host computer for which this alias is to be used.
- As an option, you can click Browse to search the DNS namespace for hosts in this domain that have host (A) resource records already defined.
- Click OK to add the new record to the zone.
- To open DNS Manager, click Start, point to Administrative Tools, and then click D
Add an alias (CNAME) resource record to a zone using a command line
- Open a command prompt.
- Type the following command, and then press ENTER:
dnscmd <ServerName>/RecordAdd <ZoneName> <NodeName> [/Aging] [/OpenAcl] [<Ttl>] CNAME <HostName>|<DomainName>