CNAME-Records (Canonical name for an alias)

CNAME-records are domain name aliases.

Computers on the Internet often performs multiple roles such as web-server, ftp-server, chat-server etc.

To mask this, CNAME-records can be used to give a single computer multiple names (aliases).

For example, the computer "computer1.xyz.com" may be both a web-server and an ftp-server, so two CNAME-records are defined:

"www.xyz.com" = "computer1.xyz.com" and "ftp.xyz.com" = "computer1.xyz.com".

Sometimes a single server computer hosts many different domain names (take ISPs), and so CNAME-records may be defined such as "www.abc.com" = "www.xyz.com".

The most common use of the CNAME-record type is to provide access to a web-server using both the standard "www.domain.com" and "domain.com" (with and without the www prefix).

This is usually done by creating an A-record for the short name (without www), and a CNAME-record for the www name pointing to the short name.

CNAME-records can also be used when a computer or service needs to be renamed, to temporarily allow access through both the old and new name.

A CNAME-record should always point to an A-record and never to itself or another CNAME-record to avoid circular references.

To create a new CNAME-record, right-click a zone in the left list in the DNS Records window, and select "New CNAME-record" from the pop-up menu.

Please note that you cannot create a CNAME-record for the zone name itself as this will always conflict with the zone's SOA-record. For more on this see https://simpledns.com/kb/158

This record type is defined in RFC1035.

 Comments
Gravatar
2 Apr 2019 14:11 UTC
JamesK.
I'm a bit confused by the post. At the top examples the CNAME-record points to another CNAME-record such as "www.xyz.com" = "computer1.xyz.com", although at the bottom part it says a CNAME-record should always point to an A-record. Could anybody elaborate?
Gravatar
17 Apr 2019 02:24 UTC
JaredK
Hey James, not sure if you're going to red this in time but the example in the article does not point a CNAME to a CNAME, it points two different CNAMEs to an A-record

Think of CNAMEs as AKAs (also known as) or nicknames. A-records would be real names.

So my A-record would be JaredK

My CNAMES could be TheMan, MrAwesome, NetworkGuru

All those CNAMES would point to my A-record of JaredK.

Hope that helps
(Never published. Used for replies and to show your Gravatar icon. Never used for any other purpose.)
Connect