CNAME

Canonical Name Record

Creates an alias that points to another domain name

Look up CNAME records
Query CNAME records for any domain
Try it now

About

The CNAME (Canonical Name) record creates an alias from one domain name to another. Instead of pointing directly to an IP address, a CNAME points to another domain name, which then resolves to an IP address. This is useful for pointing multiple subdomains to the same destination without duplicating IP addresses.

CNAME records are commonly used for services like CDNs, cloud hosting, and SaaS applications where the actual IP address may change. The canonical name (target) can be updated in one place, and all CNAME records pointing to it automatically follow.

Important: A CNAME record cannot coexist with other record types for the same name, and you cannot use a CNAME at the zone apex (bare domain).

Format & Example

Record Format
alias.domain.com. IN CNAME target.domain.com.
Example
www.example.com. 3600 IN CNAME example.com.

This makes www.example.com an alias for example.com. Any request to www.example.com will resolve to the same IP as example.com.

Common Uses

  • Pointing www to the bare domain
  • Connecting to CDN services (e.g., cdn.example.com → d1234.cloudfront.net)
  • Third-party service integration (email, analytics, etc.)
  • Simplifying DNS management for multiple subdomains

Best Practices & Tips

  • Cannot be used at the zone apex (use ALIAS or A record instead)
  • Cannot coexist with other record types for the same name
  • Adds an extra DNS lookup, slightly increasing latency
  • Great for services where IP addresses may change

Related Record Types

AAAAAALIAS