Skip to main content
CNAME

CNAME Record

Active

The CNAME (Canonical Name) record creates an alias from one domain name to another.

alias TTL IN CNAME canonical-name

In one line

The CNAME (Canonical Name) record creates an alias from one domain name to another. When a resolver encounters a CNAME, it follows the chain to the final A or AAAA record. CNAMEs cannot coexist with other record types at the same name and cannot be used at the zone apex (root domain).

Description

The CNAME record maps one domain name (alias) to another (canonical name). It is commonly used for subdomains like www.example.com pointing to example.com, or for CDN/service integrations like blog.example.com pointing to user.cdn.example.net. CNAME chains (CNAME pointing to CNAME) are valid but increase resolution latency.

Examples

www subdomain alias
shell
www.example.com.    3600    IN    CNAME    example.com.
CDN integration
shell
assets.example.com.    300    IN    CNAME    d1234.cloudfront.net.
Lookup chain
shell
dig www.example.com

;; ANSWER SECTION:
www.example.com.    3600    IN    CNAME    example.com.
example.com.    300    IN    A    93.184.216.34

Related Record Types

Specification

RFC 1035 – DNS CNAME record specification →