What Is a CNAME Record
Learn what a CNAME record is, how DNS aliases work, common uses for www and CDN hostnames, and CNAME restrictions.
Introduction
A CNAME says “this name is really that other name.” Instead of pointing directly to an IP, it points to another hostname that DNS resolves separately.
CNAME records are widely used for www, SaaS apps, CDNs and domain verification — but they have important restrictions at the root domain and when mixed with other record types.
Quick answer
A CNAME record creates an alias from one hostname to another hostname. DNS follows the CNAME to find the final A or AAAA record. CNAME is common for www, CDN hostnames and verification records, but it usually cannot be used at the root domain.
What it means
CNAME stands for Canonical Name. It maps one DNS name to another DNS name rather than to an IP address.
- Aliases one hostname to another hostname
- Common for www → root domain or CDN targets
- Cannot coexist with other records on the same name (except DNSSEC in some cases)
- Root domain CNAME is often unsupported; ALIAS/ANAME may be used instead
- CNAME target must be a hostname, not an IP address
Where you see this:
- www.example.com pointing to example.com
- CDN or SaaS provider hostnames like app.vendor.com
- Domain ownership verification targets
- Subdomains delegated to external platforms
www.example.com. 300 IN CNAME example.com.
Why this matters
A wrong CNAME sends traffic to the wrong service. CNAME conflicts at the same hostname can break MX, TXT or other records and cause hard-to-debug DNS errors.
How to check it
- Run DNS Lookup on the alias hostname (for example www.example.com).
- Note the CNAME target and follow resolution to the final A/AAAA record.
- Confirm no conflicting MX or TXT records exist on the same name.
- Use dig +short www.example.com CNAME for a quick check.
- Compare the target with your CDN or hosting documentation.
Look up CNAME records
Use DNS Lookup to see which hostname a CNAME alias points to.
Common mistakes
CNAME at root domain where unsupported
HighMany DNS providers reject or mishandle root CNAME records.
Next step: Use A/AAAA or provider ALIAS/ANAME for the root domain.
CNAME plus MX or TXT on same hostname
HighCNAME cannot share a name with most other record types.
Next step: Use a subdomain or restructure records to avoid conflicts.
CNAME target typed as IP address
MediumCNAME must point to a hostname, not an IPv4 or IPv6 address.
Next step: Use an A or AAAA record if you need to point to an IP.
Old CDN target remains in CNAME
HighTraffic still routes to a previous CDN or vendor hostname.
Next step: Update the CNAME to the current provider target.
www points to wrong hostname
Mediumwww loads a different site or error than the root domain.
Next step: Point www CNAME to the correct canonical hostname.
Example
www.example.com. 300 IN CNAME example.com.
shop.example.com. 300 IN CNAME shops.myplatform.com.
Frequently asked questions
Can I use CNAME on the root domain?
Usually no with standard DNS. Some providers offer ALIAS or ANAME records as a workaround for root-domain aliasing.
What is the difference between CNAME and A record?
A records point to an IP address. CNAME records point to another hostname.
Can CNAME and MX exist on the same name?
No. If a name has a CNAME, other record types like MX and TXT cannot normally exist on that same name.
Does CNAME affect email?
Not directly, but a CNAME conflict on a hostname needed for mail or verification records can break those services.
Related tools
Use these free tools to verify your configuration after applying changes.
Related guides
Browse all Glossary guides →Need help applying this fix?
Send us your domain, report link or issue details. CheckDomainHealth will review the request and route it to the right technical team if hands-on support is needed.
Was this guide helpful?
Your feedback helps us improve our guides for everyone.
Thanks for your feedback!