8 min
  • DNS
  • CDN

Records, aliases, and delegation

A DNS answer is not "an address". It is a set of records at a name, each with a type, and the type you asked for decides what comes back. The same name can hold several.

TypeAnswers the questionTypical value
AWhere is this name, in IPv4?93.184.216.34
AAAAWhere is this name, in IPv6?2606:2800:220:1:...
NSWho is authoritative for this zone?ns1.example.com
MXWhere does mail for this go?10 mail.example.com
TXTArbitrary text, usually proof of controlv=spf1 ...
CNAMEThis name is really that namewww.example.com

The last one is different in kind from the others. Every type above it is data. A

CNAME is an instruction: stop asking about this name and start again at that one.

Loading the DNS Explorer simulation…

Why a CNAME cannot share a name

Because a CNAME replaces the name entirely, it must be the only record there. There is no coherent way to say "this name is really that name, and also here is its mail server" — the two statements contradict each other.

That has a practical consequence people meet constantly: a zone apex like example.com must carry NS and SOA records by definition, so it can never be a CNAME. Only www.example.com can. Providers work around it with non-standard record types that behave like a CNAME and resolve to addresses at the server, but the underlying rule has not changed.

Check yourself
Why can www.example.com be a CNAME while example.com cannot?

Following an alias out of the zone

A CNAME whose target is in the same zone is answered in one exchange — the server follows the chain itself, because it can. A CNAME pointing into somebody else's zone cannot be: the walk restarts at the root and climbs down a second time, into a zone the original operator does not control.

That is not a limitation. It is the point. Pointing your name at a

CDN hands over who decides the answer, which is what lets the CDN return a different address for a visitor in Lagos than for one in Frankfurt.

Loading the DNS Explorer simulation…
Predict what happens next
The CDN answers with a 30-second TTL, where the original zone used a day. Why so short?

Key takeaways

  • A name holds a set of typed records, and the type you ask for decides what comes back.
  • Every record type is data except CNAME, which is an instruction to resolve a different name instead.
  • A CNAME must be alone at its name, which is why a zone apex can never be one.
  • An alias pointing into another operator’s zone restarts the walk from the root — and that hand-off is how a name is given to a CDN.
  • A short TTL means the answer is a decision somebody wants to revise; a long one means it is a fact. The cost of the first is query volume.

Take it further