The CNAME record (Canonical Name record) creates an alias from one domain name to another. Instead of pointing to an IP address like an A record, a CNAME points to another domain name, which then resolves to the final IP address.
Check CNAME records for any domain using our free DNS lookup tool.
Look Up CNAME Records →A CNAME record creates an alias that points one domain name to another "canonical" (true) domain name. When a DNS resolver encounters a CNAME, it follows the chain to find the actual IP address.
Think of it like mail forwarding — mail sent to one address gets redirected to another.
Similarly, a request to www.example.com can be redirected to example.com.
A CNAME record consists of these components:
| Component | Description | Example |
|---|---|---|
| Name | The alias domain | www.example.com |
| Type | Record type identifier | CNAME |
| TTL | Time to live (cache duration in seconds) | 3600 |
| Value | The canonical (target) domain name | example.com |
www.example.com. 3600 IN CNAME example.com.
This record makes www.example.com an alias for example.com. Any request to www.example.com will be resolved using example.com's A record.
When a DNS resolver looks up a domain with a CNAME record:
This means CNAME resolution requires at least one additional DNS lookup, which can add slight latency.
Point www to the root domain:
www.example.com. 3600 IN CNAME example.com.
Point subdomains to external service providers:
blog.example.com. 3600 IN CNAME example.ghost.io.
shop.example.com. 3600 IN CNAME shops.myshopify.com.
mail.example.com. 3600 IN CNAME ghs.google.com.
docs.example.com. 3600 IN CNAME hosting.gitbook.io.
Point your domain to a CDN:
cdn.example.com. 3600 IN CNAME d111111abcdef8.cloudfront.net.
static.example.com. 3600 IN CNAME example.b-cdn.net.
Verify domain ownership for services:
_domainkey.example.com. 3600 IN CNAME example.domainkey.u1234567.wl001.sendgrid.net.
CNAME records have specific limitations that must be followed:
A CNAME record cannot exist at the same name as any other record type. This is invalid:
; INVALID - CNAME cannot coexist with MX
example.com. IN CNAME other.com.
example.com. IN MX 10 mail.example.com.
You cannot create a CNAME for your root domain (zone apex) because root domains need SOA and NS records, which would conflict with the CNAME.
; INVALID - Cannot use CNAME at root
example.com. IN CNAME other.com.
To redirect your root domain, use an A record, or some DNS providers offer "ALIAS" or "ANAME" pseudo-records that work around this limitation.
While technically valid, chains of CNAMEs pointing to other CNAMEs add latency and complexity:
; Avoid chains like this
www.example.com. CNAME site.example.com.
site.example.com. CNAME hosting.provider.com.
| Feature | CNAME Record | A Record |
|---|---|---|
| Points to | Another domain name | IP address directly |
| Can be used at root | No | Yes |
| Can coexist with other records | No | Yes |
| Resolution speed | Requires additional lookups | Direct resolution |
| Target IP changes | Automatically updated | Requires manual update |
| Best for | Subdomains, external services | Root domains, direct hosting |
Some DNS providers offer ALIAS or ANAME records that work like CNAMEs but can be used at the zone apex:
If you need CNAME-like functionality for your root domain, check if your DNS provider supports ALIAS records.
Common issues and solutions:
DNS Explorer — Track CNAME records and all DNS records across your entire domain portfolio. Detect when third-party service endpoints change.
Start free DNS Explorer trial14-day full-feature trial
Use our DNS Record Finder to look up CNAME records for any domain.
Look Up CNAME Records →