Definition
A CNAME (Canonical Name) record is a DNS entry that maps one hostname to another hostname, rather than to an IP address directly. When a resolver looks up a CNAME, DNS follows the alias to the target hostname, then resolves that target as normal, adding one extra lookup step to the chain. CNAMEs are the standard way to point subdomains at managed services: www.example.com to a CDN, blog.example.com to a hosted platform, shop.example.com to a SaaS storefront. Because the target can change its underlying IP addresses freely, CNAMEs work well with services that rotate or load-balance across many servers, such as CDNs and serverless platforms. The DNS spec forbids CNAMEs at the apex domain (example.com itself), since the apex must also carry MX, TXT, and other record types that cannot coexist with a CNAME; modern DNS providers offer ALIAS or ANAME records that behave like CNAMEs there instead.
How it works
A CNAME record has a hostname and a single target hostname. When the source is queried, DNS returns the target name and the resolver looks up that name in turn. The target must itself resolve to A or AAAA records eventually.
Why it matters
CNAMEs let you point a friendly subdomain at a managed service without ever knowing or maintaining the underlying IP address, which is essential when the service uses many IPs that change over time (CDNs, load balancers, serverless platforms). They are the safest way to wire third-party services to your domain.