Differences Between A and CNAME Records

The A and CNAME records are the two common ways to map a host name (“name”) to one or more IP addresses. There are important differences between these two records.

Understanding the differences

The A record points a name to a specific IP. If you want blog.dnsimple.com to point to the server you’ll configure:

blog.dnsimple.com.     A

The CNAME record points a name to another name instead of to an IP. The CNAME source represents an alias for the target name and inherits its entire resolution chain.

How we use them

Let’s use our blog as an example:

blog.dnsimple.com.      CNAME   aetrion.github.io.
aetrion.github.io.      CNAME   github.map.fastly.net.
github.map.fastly.net.  A

We use GitHub Pages, and we set blog.dnsimple.com as a CNAME of aetrion.github.io, which is a CNAME of github.map.fastly.net, which is an A record pointing to This means blog.dnsimple.com resolves to

Which one to use

An A record points a name to an IP. A CNAME record can point a name to another CNAME or to an A record.