A CNAME record, short for canonical name record, is a DNS record that makes one name an alias of another. Instead of pointing to an IP address, it points to another domain name, and DNS follows that name to find the final address.
Quick answer: CNAMEs are perfect for connecting subdomains to services like Shopify, help desks or CDNs, because the service can change its IP addresses without you updating anything. A name with a CNAME can’t have other records, and many DNS providers don’t allow a CNAME at the root domain.
Key Takeaways
- Alias to another name: Not an IP address.
- Great for third-party services: They manage the IPs.
- No other records on the same name: A CNAME stands alone.
- Usually not at the root: Use A records or flattening there.
- Extra lookup: DNS follows the chain.
CNAME vs A Record
| Feature | CNAME | A record |
|---|---|---|
| Points to | Another domain name | IPv4 address |
| Root domain | Usually not allowed | Allowed |
| Other records on same name | Not allowed | Allowed |
| Best for | Subdomains on external services | Your own servers |
Cloudflare’s guide to CNAME records explains that a CNAME points an alias to a canonical domain and must always point to a domain name, never an IP address.
Why CNAME Records Matter
Many services ask you to add a CNAME during setup, from email marketing tools to online stores and documentation platforms. Getting it right connects your domain to the service and keeps it working if the provider changes servers.
Mistakes cause outages. Adding a CNAME to a name that already has other records, or trying to use one at the root domain, can break your site or email.
How to Add a CNAME Record
Step 1: Get the Target From the Service
Copy the exact target name the service provides.
Check: You have the full target domain.
Step 2: Choose the Subdomain
Decide which name will be the alias, like shop or www.
Check: That name has no other records.
Step 3: Add the Record
Create the CNAME in your DNS panel.
Check: Name and target match the instructions.
Step 4: Verify It Resolves
Check with a DNS records checker.
Check: The CNAME appears with the right target.
Step 5: Confirm in the Service
Use the service’s verification button.
Check: The service shows the domain as connected.
An Illustrative Example
A business launches a help center on a hosted platform. The platform asks for a CNAME from help.example.com to its servers.
After adding it, the help center loads on the company’s own subdomain. Months later, the platform changes infrastructure, and nothing needs updating because the CNAME follows the platform’s name.
Myths vs Reality
- Myth: CNAMEs work everywhere. Reality: Root domains usually need A records.
- Myth: CNAMEs slow sites significantly. Reality: The extra lookup is usually tiny.
- Myth: You can add MX records to a CNAME name. Reality: A CNAME name can’t have other records.
Check CNAME Records
See where any subdomain points.
Do It Yourself or Get Help
Adding a CNAME from service instructions is easy. Get help when CNAMEs conflict with existing records or when setting up CDNs at the root domain.
Quick Tip
When a service asks you to add a CNAME, check whether it wants the record on a subdomain like shop or help. Adding it to the wrong host name is one of the most common setup errors.
Mistakes to Avoid
- CNAME at the root: Use A records or provider flattening.
- Conflicting records: Remove other records on that name.
- Typos in targets: Copy exactly.
- Adding the full domain twice: Some panels append the domain automatically.
- Long CNAME chains: Keep them short.
FAQ
What Is a CNAME Record?
A DNS record that makes one name an alias of another.
Can a CNAME Point to an IP Address?
No. It must point to a domain name.
Can I Use a CNAME on My Root Domain?
Usually not. Some providers offer CNAME flattening or ALIAS records.
What Is CNAME Flattening?
A provider feature that resolves a CNAME at the root and returns IP addresses.
Is www Usually a CNAME?
Often, pointing to the root domain or a host.
Do CNAMEs Affect Email?
They can if added to names that need MX or TXT records.
How Long Does a CNAME Take to Work?
It depends on TTL and caching, often minutes to hours.
Can I Use a CNAME for Email?
MX records should point to host names with A or AAAA records, not to a CNAME.
Where to Go Next
- IP records: Read about A records.
- Name parts: Learn about subdomains.
- The system: See DNS.
- Delivery networks: Read about CDNs.
