CNAME Record

Last Edited



Definition of CNAME Record in the Network Encyclopedia.

What is CNAME Record?

CNAME Record stands for Canonical Name record, is a Domain Name System (DNS) resource record in a DNS server’s database or zone file. A CNAME record is used to map an alias to the canonical name (true name) of a server. The CNAME record lets you use more than one name to refer to a single host on the network.

Creating a CNAME Record in Windows Server
Creating a CNAME Record in Windows Server (using DNS manager)

If a name server is queried by a resolver to look up a host and the queried name is an alias in a CNAME record, the name server replaces the alias name with the canonical name of the host being looked up, and then looks up the address of the canonical name.

CNAME Record example

Here is an address record for the host named server12 in the Internet domain. This record has the IP address, followed by a CNAME record indicating that the name bobby (or the fully qualified domain name is an alias for the same host:  IN  A
bobby IN CNAME server12

DNAME record

DNAME record or Delegation Name record is defined by RFC 6672 (original RFC 2672 is now obsolete). A DNAME record creates an alias for an entire subtree of the domain name tree. In contrast, the CNAME record creates an alias for a single name and not its subdomains. Like the CNAME record, the DNS lookup will continue by retrying the lookup with the new name. The name server synthesizes a CNAME record to actually apply the DNAME record to the requested name – CNAMEs for every node on a subtree have the same effect as a DNAME for the entire subtree.

For example, if there is a DNS zone as follows:        DNAME        A  A
*      A

An A record lookup for will return no data because a DNAME is not a CNAME and there is no A record directly at foo.

However, a lookup for will be DNAME mapped and return the A record for, which is; if the DNAME record had been a CNAME record, this request would have returned name not found.

Lastly, a request for would be DNAME mapped and return

ANAME record

Several managed DNS platforms implement a non-standard ALIAS or ANAME record type. These pseudo records are managed by DNS administrators like CNAME records, but are published and resolved by (some) DNS clients like A records. ANAME records are typically configured to point to another domain, but when queried by a client, answer with an IP address.

ANAME record types are going through standardization, but there probably exist many non-conforming implementations, so they can do whatever the owner of the DNS platform chooses, including existing at the apex of a zone and existing for domains that receive mail. One possible advantage of ANAME records over CNAME records is speed; a DNS client requires at least two queries to resolve a CNAME to an A record to an IP address, while only one query is necessary to resolve an ANAME to an IP address.

The assumption is that the DNS server can resolve the A record and cache the requested IP address more efficiently and with less latency than its DNS clients can. The ANAME record type is currently a draft standard being considered by the IETF.