CNAME records create aliases that point to other domain names.
Do not use a CNAME for a hostname that is the target of an MX record. Mail-server targets must resolve directly to address records. For service-specific targets such as a CDN, copy the exact value supplied by the service rather than constructing one from your domain.
When to Use CNAME
www.domain.com→domain.comftp.domain.com→domain.com- A service-specific hostname, if that service explicitly supports a CNAME
- Any subdomain pointing to another domain
Steps
- Go to Domains → DNS Manager
- Click the pencil icon next to your domain
- Click Add Record
- Fill in:
- Type: CNAME
- Name: Subdomain (e.g., www)
- TTL: 3600
- Target: Destination domain
- Click Confirm
Examples
WWW subdomain:
Name: www Target: domain.com
External service:
Name: blog Target: myblog.wordpress.com
CDN setup:
Name: cdn Target: exact-target-supplied-by-your-cdn.example
CNAME vs A Record
- A Record: Points to IP address (192.0.2.1)
- CNAME: Points to another domain name
If your server IP changes, A record must be updated. CNAMEs pointing to that domain update automatically.
Rules
- Cannot use CNAME on root domain (@)
- Cannot mix CNAME with other records on same subdomain
- Target must be a domain, not an IP
- Always include trailing dot or use full domain
Common Mistakes
- Creating CNAME for @ (use A record instead)
- Creating CNAME pointing to IP address
- Having both A and CNAME for same subdomain