Struggling to tell your APIs from your CDNs? Read our comprehensive cloud computing glossary covering the most common terms.
< Back to glossary
A CNAME (Canonical Name) record is a type of DNS (Domain Name System) record that maps an alias domain name to a canonical domain name. It acts as a pointer that redirects DNS queries from one domain name to another without directly associating the alias with an IP address.
Alias Creation: A CNAME record is created for an alias domain (e.g., www.example.com) pointing to the canonical domain (e.g., example.com).
DNS Query Redirection: When a user accesses the alias domain (www.example.com), the DNS query is redirected to the canonical domain (example.com).
Final Resolution: The canonical domain resolves to its IP address through an A or AAAA record, completing the query process.
Key Features of CNAME Records: Simplifies domain management by allowing multiple aliases to point to a single domain.
Automatically reflects changes in the canonical domain’s IP address without updating each alias.
Cannot coexist with other DNS records for the same alias.
Simplified Management: Reduces administrative overhead by centralizing DNS updates at the canonical domain level.
Flexibility: Useful for managing subdomains or redirecting traffic during migrations.
Load Distribution: Helps balance traffic across multiple services by pointing aliases to different domains.
Slower Resolution: Increases query time due to additional lookups between alias and canonical domains.
Restrictions: Cannot point directly to an IP address or coexist with other record types for the same alias.
Real-World Example: A company uses a CNAME record to point blog.example.com (alias) to example.com. When users access blog.example.com, they are seamlessly redirected to example.com, which resolves its IP address via an A record.