Glossary · DNS records
What is a CNAME record?
The short answer
A CNAME record is a DNS record that makes one name point to another name. It works like a nickname: when someone looks up the first name, DNS tells them to use the second name instead. For example, www.example.com can be a CNAME that points to example.com.
Also called: canonical name record, DNS alias, CNAME
By Ali Tahir Sajjad · Updated · 3 min read
CNAME record: what to remember
- CNAME stands for canonical name. A CNAME record says: this name is another name for that name.
- A CNAME record points to a name. An A record points to a number (an IP address).
- A name that has a CNAME record cannot have other records, and the main domain itself normally cannot be a CNAME.
- In email, CNAME records are used for custom tracking domains and for DKIM in Microsoft 365.
What does CNAME record mean?
CNAME stands for canonical name, which simply means “the real name”. A CNAME record tells the internet that one name is just another name for something else.
Think of a nickname. Your friends call you “Bobby”, but your passport says “Robert Smith”. If someone needs to look you up officially, “Bobby” has to be turned into “Robert Smith” first. A CNAME record does that for domain names.
So when a browser or mail server looks up a name that has a CNAME record, DNS replies: “that is a nickname, look up this other name instead.”
How a CNAME record works
Say www.example.com has a CNAME record that points to example.com.
- Someone types
www.example.com. - Their computer asks DNS: where is
www.example.com? - DNS answers: that is another name for
example.com. - The computer asks again, this time about
example.com, and gets the server’s address.
The useful part is step 4. If the server’s address ever changes, you update it in one place and every nickname follows automatically.
CNAME record examples
A CNAME record has a name, a type and the target it points to.
| Name | Type | Points to | What it is for |
|---|---|---|---|
www |
CNAME | example.com |
The www version of a website |
track |
CNAME | a name from your cold email tool | A custom tracking domain |
selector1._domainkey |
CNAME | a name from Microsoft | DKIM for Microsoft 365 |
autodiscover |
CNAME | autodiscover.outlook.com |
Helps Outlook find your mailbox |
In each example, the CNAME record lets another company keep the technical details up to date for you. You only point at the name they gave you.
CNAME record vs A record
| CNAME record | A record | |
|---|---|---|
| Points to | Another name | An IP address (a number) |
| Example | www → example.com |
example.com → 203.0.113.10 |
| Use it when | A provider gives you a name | You know the server’s number |
| Allowed on the main domain? | Normally no | Yes |
An easy way to remember it: an A record is an address, a CNAME record is a name.
How CNAME records are used in cold email
You will meet CNAME records in three places when you set up cold email infrastructure.
1. A custom tracking domain. Cold email tools can count opens and clicks. To do that they rewrite the links in your email. By default those links use the tool’s own shared domain, which thousands of other senders also use. With a CNAME record such as track.yourdomain.com, the links use your domain instead. This keeps your emails from being judged by what strangers send.
2. DKIM in Microsoft 365. Microsoft asks you to add two CNAME records for DKIM, called selector1 and selector2. They point to DKIM keys that Microsoft looks after. You can read more on the DKIM selector page.
3. Mailbox settings. A CNAME record called autodiscover helps Outlook work out your mailbox settings by itself.
PureMail adds the DNS records your inboxes need, including the Microsoft 365 DKIM CNAME records, when our team sets up your Microsoft 365 inboxes.
CNAME record rules and common mistakes
- One CNAME record means no other records. A name that has a CNAME record cannot also have an MX record or a TXT record. This is the most common CNAME mistake.
- Do not put a CNAME on the main domain. Your main domain needs its MX and TXT records for email, so a CNAME there would break email.
- Do not point an MX record at a CNAME. An MX record should point to a real server name, not to a nickname.
- Copy the target exactly. One missing letter or an extra dot and the CNAME record points nowhere.
- Give it time. A new CNAME record can take from a few minutes to a day to work everywhere.