The 'CNAME' Resource Record (RR) is standarized in RFC 1035 and defines an alias for an existing host defined by an 'A' or 'AAAA' resource record.


ID: 5 (0x0005)
Defining RFC: RFC 1035,  Section 3.3.1,  Page 14
Description: Canonical name record
Function: Alias of one name to another: the DNS lookup will continue by retrying the lookup with the new name.
Status: Active

'CNAME' RR Syntax

name ttl class type rdata {canonical-name}

RR Field Example Description
name ftp The name is unqualified, causing $ORIGIN substitution. You can also write this as a fully qualified domain name (FQDN) such as

Blank Name - A record that has nothing in the 'name' field gets used for all requests being made to the base domain such as (Same as Parent)
ttl This is the records time to live value (in seconds). If there is no TTL specified, the zone's default $TTL Directive will be used.
class IN Specifies the class to be 'Internet'.
type CNAME Specifies the RDATA field will contain data in the CNAME RDATA format.
rdata canonical-name Specifies that name '' is aliased to the host '' in a foreign or external domain.


Snippets from a fictitious forward lookup '' zone file

Typical 'CNAME' Record Entry

;   Zone records

CNAME RRs are often used when assigning service names to existing hosts, for example, if a host is actually called 'server01' but also runs an FTP and WEB service then CNAME records are fequenly used to define these services as in the following example:

ftp IN CNAME server01
web IN CNAME server01
server01 IN A

Invalid Configurations

CNAME records should not be used with either NS or MX records.
Although the following example may work, its technically invalid and should be avoided.

server01 IN A

See Also

This content was last updated on December 9, 2020
An error has occurred. This application may no longer respond until reloaded. Reload 🗙