A CNAME record says a name is an alias: “for www.example.com, look up shop.hosting.example.net instead”. The resolver follows it and returns the other name’s records.
| Type number | 5 |
| Other records on the same name | Not allowed |
| At the zone apex | No |
| Defined in | RFC 1034 §3.6.2 |
Look up the CNAME records of any name
One question to DNS, answered as it is. You can change the record type too.
What it does
CNAMEs are how hosted services attach to your domain: the service can move its servers and your CNAME keeps working. Email authentication uses them too — many DKIM keys are CNAMEs to a key the sending service hosts.
A name with a CNAME cannot have any other record. That is why a domain’s apex (example.com itself), which always has NS and SOA records, cannot be a CNAME — the reason ALIAS and CNAME flattening exist.
How it is written
| Field | Meaning |
|---|---|
| Name | The alias |
| Value | The name it points to (the canonical name) |
Examples
www.example.com. 3600 IN CNAME example.hosting.example.net.
www is served wherever the hosting company’s name points.
s1._domainkey.example.com. IN CNAME s1.domainkey.u123.wl.sendgrid.net.
A DKIM key hosted by SendGrid.
Common mistakes
- A CNAME at the apex, which many DNS hosts refuse and the rest break mail with.
- A CNAME on a name that also has MX or TXT records.
- An MX or NS record pointing at a CNAME, which the standards forbid.
- A dangling CNAME to a service you stopped using — it can be claimed by someone else.
What we recommend
Use CNAMEs for subdomains that point at services; use A/AAAA or your DNS host’s ALIAS feature at the apex.
ALIAS and CNAME flattening at the apex →
Questions
Does a CNAME slow a site down?
By one more lookup the first time, then the answer is cached like any other. It is rarely noticeable.
Sources
Checked on 25 September 2026 against these official sources:
- RFC 1034: Domain names — rfc-editor.org