CNAME records are one of the most commonly misunderstood DNS record types. They allow you to create an alias — pointing one name to another name instead of directly to an IP address.
Quick answer: A CNAME (Canonical Name) record creates an alias for a domain name, pointing it to another domain name. For example, www.example.com can be a CNAME pointing to example.com. DNS then follows the chain to find the final IP.
How CNAME Works
When a browser looks up a CNAME record, it follows the alias to the target domain, then looks up that domain's A record to get the IP address. This two-step lookup is slightly slower but much more flexible — if the IP changes, you only need to update one A record.
www.example.com IN CNAME example.com
example.com IN A 104.21.33.85
When to Use a CNAME
- www subdomain — Point www to the root domain
- Third-party services — e.g.
shop.example.com→yourstore.myshopify.com - CDN domains — e.g.
assets.example.com→ your CDN provider's hostname - Email services — Some email providers require CNAME records for domain verification
CNAME Restrictions
- Cannot be used on root domain — You cannot put a CNAME on
example.comitself (only on subdomains). Use ALIAS or ANAME records if your DNS provider supports them. - Cannot coexist with other records — A CNAME on a name cannot have any other records (including MX) on the same name.
- No recursive CNAME chains — Too many hops slow down DNS resolution.
CNAME vs A Record
A RecordPoints directly to an IP address
CNAME RecordPoints to another domain name (alias)
Use A whenYou have a fixed IP address for the service
Use CNAME whenYou want to alias to a hostname (e.g. third-party service)
Check your CNAME records using our DNS Lookup tool — select "CNAME" as the record type.