The Complete Guide to CNAME Records

This is the third installment of a ten-part series outlining the ten most common Domain Name System (DNS) Records.  In the first installment I discussed the A Record; I defined precisely what IPv4 was, went in-depth on Time To Live (TTL), and identified the three types of DNS Servers (DNS Resolver, DNS Root Serve, and Authoritative DNS Server).  I also demonstrated that if you wanted to point your website to a IPv4 address, you would create an A Record on your DNS provider.  In the second installment, I discussed the AAAA Record, and If you wanted to point your domain to an IPv6 Address, you would create an AAAA Record on your DNS provider.  In this third installment I’m going to discuss and define the CNAME Record, or Canonical Name Record.

When Should You Add a CNAME Record to Your Domain?

If you want to customize the domain address a CNAME record is probably your best option.  A CNAME Record is a type of DNS Record that maps an alias name to a true (or canonical) domain name.  Common use of the CNAME Record is to map a subdomain, such as www or mail to the domain hosting that subdomain’s content.  For example, a CNAME can be used to map the web address https://www.jasonofflorida.com to the actual website of the domain, jasonofflorida.com.

How do cname records work?

A CNAME record is stored in a domain’s DNS settings as a set of values. The first value identifies the alias you’re creating the record for, (like www or mail). The second value identifies the domain the alias should point to (like jasonofflorida.com).  By using a CNAME, your associating with a domain name and not an IP address.

setting up a cname record

Like setting up any DNS record with your host provider, you’ll typically selecting “manage domains” then “manage DNS” – and from there you can add and remove DNS records associated with your domain.  In GoDaddy adding a CNAME looks like this:

GoDaddy Adding CNAME Record

In the Host field you can include a period (.) but not as the first or last character. Consecutive periods (…) are not allowed. The host cannot exceed 25 characters or be the @ symbol.  From the example above, the host would be mail.jasonofflorida.com.  The Points to field refers to the URL you are setting as the destination for the host, or from the example above would be jasonofflorida.com – in Godaddy, you use the @ symbol to point directly to your domain name. TTL, or Time to Live, refers to how long the server should cache information. Once you enter those fields select save – note that while times vary, it can often take 24-48 hours to propogate this new record worldwide.  To track this, I use whatsmydns.net.

Next in the DNS Records Series I will discuss the MX Record, or Mail Exchanger Record.

Leave a Reply