CNAME · type 5

Makes one name an alias of another.

Short answer

A CNAME says “this name is really that name”: a resolver that finds one restarts the lookup at the target. It is how you point shop.example.com at a SaaS provider without knowing its addresses.

Type
CNAME
Code
5
Defined in
RFC 1035
IANA description
the canonical name for an alias
Field: Target
The canonical name, written fully qualified with a trailing dot

How it works

Because a CNAME replaces everything at its name, it can’t coexist with other records there, which is why the zone apex (example.com itself, which must have SOA and NS) can’t be a CNAME. DNS hosts offer “ALIAS”, “ANAME” or “CNAME flattening” to fill that gap; those are provider features, not a record type on the wire.

Example

shop.example.com.  3600  IN  CNAME  shops.provider.example.

Example uses reserved documentation names and addresses (RFC 2606, RFC 5737, RFC 3849).

Common mistakes

  • A CNAME at the apex.
  • A CNAME next to MX or TXT records on the same name.
  • Chains of several CNAMEs, which add a lookup each.

How to check yours

A quick test: look up the alias and you should see the CNAME first and then the target’s records. If a provider asks you to create a CNAME at a name that already has MX or TXT records, use a different label or a flattening feature instead.

For email

DKIM keys are often delegated with CNAMEs (Microsoft 365 selector1/selector2, SendGrid s1/s2), so the provider can rotate the key.

Related record types

Sources

Sources

  1. IANA: Resource Record (RR) TYPEs registry · checked 5 Oct 2026
  2. RFC 1035 · checked 5 Oct 2026