CNAME record
In one line
A CNAME record is a DNS entry that makes one name an alias of another name. Instead of pointing at a server's number, it says "look up that other name and use its answer", which is why it suits subdomains such as www.
How a CNAME works
CNAME stands for canonical name. A CNAME record on www.example.com might say: the real name is sites.example.net. When a browser asks for www, DNS follows the alias, looks up the real name, and returns whatever that name points at.
The useful part is that you never copy a server's number into your own records. If the service you point at moves its servers, it updates its own name and your CNAME keeps working.
Where you can use one
A CNAME works on a subdomain: www, shop, hello and so on. Hosting services often ask for one because it lets them change their setup without asking you to edit DNS again.
There are two firm rules. A name with a CNAME cannot hold other records at the same time, so you cannot put a CNAME next to an MX or TXT record on that exact name. And the standard does not allow a CNAME on the bare domain itself, the apex, because the apex must hold other records such as nameservers. Some DNS hosts offer a look-alike record, often called ALIAS, ANAME or flattening, that behaves like a CNAME at the apex.
CNAME or A record
Use a CNAME when you are given a host name to point at. Use an A record when you are given an IP address, or when you are setting up the apex. Many setups use both: an A record for example.com and a CNAME for www.example.com.
Checking a CNAME
After you save a record, it can take a little while to show everywhere, depending on its TTL. Our DNS checker shows what a name points at right now. The custom domain guide explains which record to add for Mini Casa. Custom domains are in preview, so the exact target appears in your dashboard when domain connection is available for your account. You can read more on the custom domains page.
Questions people ask
Can I use a CNAME on my root domain?
Not as a true CNAME. The standard forbids it at the apex because that name also holds nameserver and other records. Some DNS hosts offer an ALIAS or flattened record that gives the same result.
Why does my CNAME conflict with another record?
A name that has a CNAME cannot hold any other record type. If the same name already has an A, MX or TXT record, remove or move it before adding the CNAME.