System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)

Canonical Name (CNAME)

Example 5–29 shows the syntax of a canonical-name (CNAME) resource record.


Example 5–29 CNAME Record Format


 nickname [optional TTL] class CNAME	canonical-name

The CNAME specifies a nickname or alias for a canonical name. A nickname should be unique. All other resource records should be associated with the canonical name and not with the nickname. Do not create a nickname and then use it in other resource records. Nicknames are particularly useful during a transition period, when a machine's name has changed but you want to permit people using the old name to reach the machine. Nicknames can also be used to identify machines that serve some specific purpose such as a mail server. Example 5–30 is a sample CNAME resource record.


Example 5–30 Sample CNAME Resource Record


;nickname      [TTL]	class	CNAME	canonical-name
mailhost		IN	CNAME	antares.doc.com