A CNAME (Canonical Name) record cannot coexist with any other DNS records that use the same hostname.
This means that if a hostname has a CNAME record, no other DNS record types can be created for that same name, including:
- A records
- AAAA records
- MX records
- TXT records
- SOA records
- Additional CNAME records
Example
If the following record exists:
blog.example.com CNAME example.com
Then no other DNS records can exist for blog.example.com.
For example, the following configuration would be invalid:
blog.example.com CNAME example.com
blog.example.com MX mail.example.com
This restriction exists because a CNAME functions as an alias, meaning the hostname is entirely redirected to another domain.
Exception: CNAME Flattening
Some DNS providers support a feature called CNAME flattening. With this feature, the DNS provider resolves the CNAME target internally and returns the resulting A or AAAA records to the resolver.
Comments
0 comments
Please sign in to leave a comment.