Know the eight most common DNS record types
There are dozens of DNS record types. Understanding the most common ones can help you detect threats and keep on top of what's happening…
Read moreCNAME (canonical name) is a DNS record type that maps an alias domain name to a canonical name, enabling multiple hostnames to reference a single target that automatically updates when the service address changes. Organizations commonly use CNAMEs to point hostnames at content delivery networks, hosted applications, and load balancers, reducing manual edits across large zones and simplifying service migrations. However, CNAMEs introduce operational risks including security vulnerabilities like subdomain takeover when pointing to external services, resolution delays with long alias chains, and compatibility issues when coexisting with other record types like MX or TXT records, requiring regular audits and careful management to prevent DNS failures and domain hijacking.
A CNAME record stores an alias name and the canonical name it points to. When a resolver queries the alias, the answer tells it to look up the canonical name instead.
A name that has a CNAME record must not have any other record types at the same name, which is why a CNAME cannot sit at a zone apex, where SOA and NS records must exist. Each link in the chain is cached according to its own TTL, and long chains add lookup time.
Adding a CNAME at the apex of a zone conflicts with the SOA and NS records that must exist there. Servers may reject the zone load, or mail and delegation may break if the record is accepted.
A CNAME created at a name that already has MX, TXT or other data violates RFC 1034. Symptoms include mail delivery failures, lost verification records and inconsistent answers between resolvers.
Aliases that point to aliases add lookups and latency, and a loop between two names causes resolution to fail with SERVFAIL. Resolvers cap chain depth, so deep chains can fail intermittently.
A CNAME left pointing to a deleted or decommissioned target returns NXDOMAIN for the alias. If the target name belongs to an external service that someone else can claim, the alias can be abused for subdomain takeover.
The alias and the canonical name each carry their own TTL, so a change at the target may reach clients at different times. Engineers see some users hitting the old address after a cutover until both cached entries expire.