The apex limit
RFC 2181 states that a name that has a CNAME may hold no other data, apart from DNSSEC records. The root of a domain (example.com) always has other records, such as SOA and NS, and usually MX, so a plain CNAME there is not valid. DNS providers offer alias, flattened or ANAME records as a workaround; they are provider features, not standard records, so check how yours behaves.
Common mistakes
Adding a CNAME where an A record already exists, creating a CNAME chain several steps long, or pointing a CNAME at a name that no longer exists, so the site stops resolving.
An example
www.example.com. 3600 IN CNAME shops.platform.example. says that www is an alias of shops.platform.example. When the platform moves its servers it changes its own records and the client’s site follows without any DNS edit. Run dig www.example.com CNAME +short to print the target. The same name cannot also hold an MX or TXT record in standard DNS, which is why a domain’s mail records stay on the bare domain while only www is an alias.
What to check
Which names are aliases, where they point, and whether the target still belongs to the platform you expect.
Sources
Read on . Standards and vendor pages change; confirm the current text before you rely on it.
- RFC 2181, Clarifications to the DNS specification (www.rfc-editor.org)