CNAME Lookup - Check Where an Alias Points
Enter a subdomain such as www.example.com to see its CNAME record, follow every hop of the alias chain and confirm the final target resolves.
What is a CNAME record?
A CNAME (canonical name) record makes one name an alias of another. Instead of giving www.example.com its own IP address, you point it at another name, and DNS answers with that name’s records. When the target’s IP address changes, the alias follows automatically.
www.example.com. 3600 IN CNAME example.com.
shop.example.com. 3600 IN CNAME shops.myshopify.com.What this CNAME lookup checks
- The CNAME record on the name you enter, with its TTL.
- The full chain: if the target is itself an alias, every hop is followed and listed, as is common with CDNs.
- The final target: whether it resolves to an IP address. An alias pointing at a name that does not resolve breaks the website or service.
- Loops: a chain that points back to itself can never resolve.
CNAME rules to know
- No CNAME on the root domain.
example.comitself cannot be a CNAME, because it must also hold NS and SOA records. Some DNS hosts offer “CNAME flattening” or ALIAS records to work around this. - A CNAME stands alone. A name with a CNAME should have no other records, such as MX or TXT.
- Don’t point MX records at a CNAME. MX targets must be names with their own A or AAAA records.
- Keep chains short. Every extra hop is another lookup before the name resolves.
Common uses for CNAME records
- Pointing
wwwat the root domain. - Connecting a subdomain to a hosted service such as a shop, help desk or website builder.
- Routing traffic through a CDN.
- Email services: DKIM keys from providers such as Microsoft 365 or SendGrid are often published as CNAMEs to the provider. Check them with the DKIM Checker.
CNAME lookup from the command line
dig www.example.com CNAME +short
nslookup -type=cname www.example.comFrequently asked questions
Enter the full subdomain, such as www.example.com, in the CNAME lookup above. It shows the alias target, follows any further aliases and checks that the final name resolves. On the command line, run dig www.example.com CNAME.
DNS does not allow a CNAME on the root of a domain, because the root must also hold NS and SOA records and a CNAME cannot share a name with other records. Use an A record instead, or an ALIAS / flattened CNAME if your DNS host offers one.
An A record points a name directly at an IPv4 address. A CNAME points a name at another name, and DNS then uses that name’s A records. Use a CNAME when the target’s IP address is managed by someone else and may change.
Servers that cached the old record keep it until its TTL expires, usually minutes to a few hours. This tool queries DNS live, so it shows the current record as soon as your DNS host publishes it.