CNAME Lookup |
A CNAME record makes one name an alias of another: www.example.com → example.netlify.app.
To find the IP, DNS follows the alias to the target name and looks up its A (IPv4) and AAAA (IPv6) records. This CNAME checker follows the chain alias by alias, up to 8, to the final IP.
What Is a CNAME Record?
A CNAME (canonical name) record says "this name is an alias; ask for that other name instead."
www.example.com. 3600 IN CNAME example.netlify.app.
When a browser asks for www.example.com, the resolver finds the CNAME, asks for
example.netlify.app instead, and returns that name's IP addresses. The browser never sees the
difference. CNAMEs are how most sites connect a subdomain to a service: www to a host,
shop to Shopify, cdn to a CDN, help to Zendesk. The lookup names
more than 50 such services from the target name.
CNAME vs A Record
An A record points a name to an IP address; a CNAME points a name to another name, which then has the A record.
| A record | CNAME record | |
|---|---|---|
| Points to | An IPv4 address (AAAA for IPv6) | Another hostname |
| Root domain | Yes | No (use ALIAS / flattening) |
| Other records on the same name | Allowed (MX, TXT…) | None allowed |
| Lookups | 1 | 1 per alias, then the A record |
| When the provider changes IPs | You must update it | Follows automatically |
| Use it for | Your own servers, the root domain | Subdomains on a SaaS, CDN or host that gives you a hostname |
Why You Can't Put a CNAME on the Root Domain
A CNAME can't coexist with other records (RFC 1034), and the root domain must have SOA and NS records, so example.com itself can't be a CNAME.
A CNAME on the root would also hide your MX and TXT records, breaking email and verification. DNS providers solve this with a record that behaves like a CNAME but answers with A records: CNAME flattening (Cloudflare), alias records (Amazon Route 53), ALIAS or ANAME (DNSimple, DNS Made Easy and others). Because they answer with IPs, this lookup shows a flattened root as "no CNAME" with its addresses, which is correct.
CNAME vs ALIAS: What's the Difference?
| CNAME | ALIAS, ANAME, CNAME flattening, Route 53 alias | |
|---|---|---|
| On the root domain | No | Yes: that is what they are for |
| What resolvers get back | The target name; they then look up its IPs | Usually IP addresses (A/AAAA), looked up by your DNS provider when the query arrives |
| Other records on the same name | Not allowed (RFC 1034) | Depends on the provider: DNSimple's ALIAS can sit next to MX and TXT records, for example |
| Standard | Yes, in every DNS server | No: each provider's own feature, so it only works at that provider |
| Can point to | Any hostname | Any hostname, except Route 53 alias: selected AWS resources or another record in the same zone |
Cloudflare flattens a CNAME on the root automatically, on every plan. Route 53 doesn't charge for alias queries to AWS resources, but does charge for CNAME queries.
How to Add a CNAME Record (GoDaddy, Cloudflare, Namecheap, Route 53)
Add a record of type CNAME with the subdomain as its name (www, blog, shop) and the hostname you were given as its value, then look it up above to check it.
| DNS provider | Where to add it |
|---|---|
| GoDaddy | Domain Portfolio > select the domain > DNS > Add New Record > type CNAME. Name: the prefix only (www, blog), never @; Value: the target hostname; then Save |
| Cloudflare | Select the domain > DNS > Records > Add record > type CNAME. Enter the name and the target hostname, then Save. With the orange cloud on (proxied), lookups return Cloudflare's IPs instead of your target, so set verification CNAMEs to DNS only |
| Namecheap | Domain List > Manage > Advanced DNS > Add New Record > CNAME Record. Host: the subdomain only (Namecheap adds the domain); Value: the target; then Save All Changes |
| Amazon Route 53 | Hosted zones > select the zone > Create record > type CNAME, with the subdomain as the name and the target hostname as the value. For the root domain, use an alias record if the target is an AWS resource |
Common mistakes: the full domain typed in the name field (some panels, such as Namecheap, add it again, giving www.example.com.example.com); a URL (https://…) or an IP address as the value, where a CNAME needs a hostname; and a CNAME on a name that already has other records, which DNS doesn't allow.
Dangling CNAMEs and Subdomain Takeover
If a CNAME points to a cloud resource you deleted, someone else may create that resource and serve content on your subdomain.
It happens when a team shuts down a storage bucket, an app or a help center but forgets the DNS record. The record now points to a name that doesn't exist. On services where names are first come, first served, an attacker registers that name and gets a page on your subdomain, with your cookies and your reputation.
- Fix: delete the CNAME first, then the cloud resource. Never the other way round.
- Check: look up old subdomains here. A chain that ends in "doesn't exist" is flagged as a dangling CNAME.
- Honest limit: a name that still exists can also be unclaimed on some services (it shows the provider's "not found" page). DNS alone can't see that; open the subdomain in a browser to be sure.
Do it yourself
How to Check a CNAME with nslookup or dig
nslookup -type=cname www.example.com or dig www.example.com cname +short; plain dig www.example.com shows the whole chain.
Windows Command Prompt
nslookup -type=cname www.example.com
nslookup www.example.com
The second command follows the chain: the aliases appear under "Aliases".
Windows PowerShell
Resolve-DnsName www.example.com -Type CNAME
Resolve-DnsName www.example.com
Mac / Linux dig
dig +short www.example.com cname
dig www.example.com
Without a type, dig prints every CNAME of the chain in the ANSWER section, then the A records of the last name.
How This CNAME Lookup Works
| Query | Live DNS queries (no cache) to the server you pick: Google, Cloudflare, Quad9, OpenDNS, DNS4EU, AdGuard, Control D, Yandex, or the authoritative servers of each name; or all of them with "Compare" |
| Chain | One CNAME query per hop, up to 8 hops, with a loop guard; then A and AAAA queries for the last name |
| Services | Recognised from each target name (CDNs, hosting, SaaS); no match, no label |
| Dangling check | Flagged when a target returns NXDOMAIN (the name doesn't exist) |
| Runs on | Our server in the US (AWS, N. Virginia) |
| What we keep | Lookups are not saved. Our server and Cloudflare keep standard access logs. |
Frequently Asked Questions
How do I check a CNAME record?
www.example.com) and click Lookup. You'll see each alias in the chain with its TTL, the service it points to, and the final IP addresses. In a terminal, run dig www.example.com cname +short or nslookup -type=cname www.example.com.What is the difference between a CNAME and an A record?
Why does my lookup show no CNAME?
www) and choose Authoritative DNS to skip resolver caches.Can the root domain have a CNAME?
Can a CNAME redirect my domain to another website?
What does "CNAME Cross-User Banned" (Cloudflare error 1014) mean?
Can a CNAME point to another CNAME?
What is a dangling CNAME?
Next steps