Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

CNAME

Direct answer

A CNAME record makes one name an alias for another (canonical) name; the resolver follows the chain and returns the target's A/AAAA records. A name with a CNAME cannot have other record types.

When to use this

Use it when an alias does not resolve, or points to an unexpected target.

First 30 seconds

1. A CNAME aliases one name to another.

2. Cannot coexist with other records at the same name.

3. Not allowed at zone apex.

4. Chains add lookups.

5. Target must resolve.

Operational verification

query alias → CNAME → target → A/AAAA

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard · Cisco IOS / IOS XE
Key commanddig www.example.com +noall +answer
Scope / prerequisiteUse it when an alias does not resolve, or points to an unexpected target.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Checking CNAMEs Verify boundary
dig www.example.com +noall +answer
dig www.example.com CNAME +short
nslookup -type=CNAME www.example.com

Follow the chain to the final A/AAAA record. Dangling CNAMEs pointing at deleted cloud resources can be taken over by attackers (subdomain takeover) — remove them.

Step 2 Verification & troubleshooting Narrow the fault

1. Record queried name/type and resolver.

2. Test reachability and UDP/TCP 53.

3. Query the recursive resolver.

4. Trace delegation/authority when needed.

Step 3 Common mistakes Narrow the fault
  • CNAME at the zone apex.
  • CNAME chains (several hops) slowing resolution.
  • Other record types on the same name as a CNAME.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points
  • A/AAAA map names to IPv4/IPv6; CNAME aliases one name; PTR is reverse lookup
  • Recursive and authoritative roles answer different questions
  • UDP 53 is common, while TCP 53 is required for some large replies and zone operations
  • NXDOMAIN, NODATA, SERVFAIL and timeout indicate different boundaries; TTL controls cache lifetime.
Key checks
  • dig <alias> CNAME — target
  • dig <alias> +short — resolved chain
ReferenceWhat it is1 section · depth on demand

Rules

  • A CNAME cannot exist at the zone apex (example.com) alongside SOA/NS; use ALIAS/ANAME or flattening from the DNS provider.
  • A name with a CNAME cannot have other records.
  • Each extra CNAME in a chain adds a lookup.

Common use: www CNAME example.azurewebsites.net. to follow a provider's changing addresses.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

CNAME records

A CNAME makes a name an alias for another, canonical name. RFC 1034 describes the rules: the CNAME's data is the canonical name; if a CNAME is present at a node, no other data should be present there; and a resolver that finds a CNAME restarts its query at the canonical name, except when the query asked for the CNAME record itself.

Format

shop.example.net.   300   IN   CNAME   shop-prod.cdn.example.com.
shop-prod.cdn.example.com. 60 IN A   198.51.100.20

Resolution steps

StepAction
1Client asks for shop.example.net A
2Server finds a CNAME to shop-prod.cdn.example.com
3Resolution restarts at the canonical name
4The A record is returned along with the CNAME
host$ dig shop.example.net A +noall +answer
shop.example.net.            300 IN CNAME shop-prod.cdn.example.com.
shop-prod.cdn.example.com.    60 IN A     198.51.100.20
host$ dig shop.example.net CNAME +short
shop-prod.cdn.example.com.

Rules and consequences

Rule (RFC 1034)Consequence
No other data at a CNAME nodeA zone apex (example.net itself) can't be a CNAME, because it needs SOA and NS
Restart at the canonical nameEach alias adds a lookup
Long chains should be avoidedSlower, more fragile resolution
Loops and aliases to missing names are errorsResolution fails

Typical uses

UseExample
Pointing to a provider's host nameSaaS or CDN endpoints
Several service names on one hostwww, app → web01
Moving servicesChange one target instead of many records

Alternatives at the apex

Many DNS providers offer ALIAS/ANAME-style records that resolve the target server-side and return A/AAAA records, since a CNAME isn't allowed at the zone apex.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Quick reference

A CNAME makes one name an alias of another, so several names can follow a single canonical record — useful when a service moves between servers or to a cloud provider. The resolver follows the alias and returns the final address. CNAMEs have restrictions that surprise people: they cannot share a name with other records, and authentication protocols and TLS certificates must recognise the alias name as well.

CNAME records alias one name to another canonical name; resolvers follow the chain.

intranet IN CNAME web01.corp.example.com.
dig intranet.corp.example.com +noall +answer

Rules: a CNAME cannot coexist with other records at the same name (so not at the zone apex — use ALIAS/ANAME/flattening where providers support it), chains add lookups, and services relying on Kerberos/TLS need SPNs/certificates for the alias name too.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 1034

Authoritative/upstream documentation reviewed for bounded claims in IP Services → DNS → CNAME. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc1034.html · confidence 94%
Confirmation

Confirm action

Continue?