CNAME records create aliases that point to other domain names.
When to Use CNAME
www.domain.com
→domain.com
ftp.domain.com
→domain.com
mail.domain.com
→domain.com
- 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: yourdomain.b-cdn.net
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