A CNAME (Canonical Name) record makes one hostname an alias of another. It is useful for pointing www to your root domain or directing a subdomain to an external service that gives you a hostname instead of an IP.
Create the CNAME
- In cPanel, open Zone Editor and click Manage beside the domain.
- Click + Add Record and select CNAME Record.
- In Name, enter the alias, for example www or shop.
- In Record, enter the target hostname the alias should follow.
- Click Add Record.
Example Values
| Field | Value | | ----- | ----- | | Type | CNAME | | Name | www | | Record | yourdomain.com |
Rules to Remember
- A CNAME cannot exist alongside any other record on the same name. Do not place a CNAME on your root domain.
- The target should be a hostname, never an IP address. Use an A record when you need to point to an IP.
- Some services require the target to end with a trailing dot. Follow the exact value the service provides.
Verify It Works
After propagation, confirm the alias resolves to its target:
dig www.yourdomain.com CNAME +short
The output should show the target hostname. If it returns nothing, check for a conflicting record on the same name or a typo in the target value.