Skip to content

CNAME lookup

Enter a subdomain such as www.example.com to see which hostname it is an alias of. The result compares four public resolvers with the domain's own nameserver and flags a CNAME placed on a bare domain.

What a CNAME record is

A CNAME (canonical name) record makes one name an alias of another. When a resolver looks up www.example.com and finds a CNAME to example.com, it restarts the lookup at example.com and returns that name's addresses. This is how you point a subdomain at a third-party service: the service can change its IP addresses whenever it needs to, and your record keeps working because it names a hostname, not an address.

A CNAME has a strict rule: it must be the only record at its name. RFC 1034 and RFC 2181 forbid mixing it with A, MX, TXT, or any other data at the same name. Because a bare domain such as example.com always carries SOA and NS records, it cannot hold a CNAME (RFC 1912). Many DNS providers work around this with ALIAS, ANAME, or CNAME flattening, which follow the target behind the scenes and publish plain A and AAAA records at the apex instead.

Example CNAME records

  • www.example.com. 3600 IN CNAME example.com.

    www is an alias of the bare domain, so it always resolves to whatever addresses example.com has.

  • blog.example.com. 3600 IN CNAME example.github.io.

    The blog subdomain is handed to a hosting platform, and the platform controls the final IP addresses.

  • example.com. 3600 IN CNAME example.hosting-platform.net.

    A CNAME on the bare domain. This breaks the DNS rules and conflicts with the domain's NS, SOA, and MX records.

How to read your result

Look up the exact name
CNAME records belong to one specific name, so enter the full subdomain, such as www.example.com or shop.example.com. A result of no records for a name that has A records is normal. It just means that name is not an alias.
The target is the next hop, not the end
The records column shows the hostname this name points to directly. That target may be another CNAME, so the chain can continue. To see the IP addresses visitors finally reach, run an A lookup on the same name.
The apex warning
If you look up a bare domain and it returns a CNAME, the result flags it. Even if your site appears to load, mail and other records at that name can break, and different resolvers may handle the conflict differently.
Flattened records show no CNAME
If your provider flattens an apex CNAME or uses an ALIAS record, the lookup finds no CNAME at all, because resolvers only receive A and AAAA records. That is how flattening is supposed to work. Run an A lookup to confirm the addresses.

Common CNAME record problems

CNAME on the bare domain
A service tells you to point your domain at its hostname, and you add a CNAME at the apex. Some providers reject it, others accept it and break your MX and TXT records. Use the provider's ALIAS or flattening option for the apex, or the A records the service publishes, and keep the CNAME for www.
CNAME alongside other records
Adding a TXT verification record or MX record to a name that already has a CNAME breaks the only-record rule. Resolvers may return the CNAME and ignore the rest, or return inconsistent answers. Put the other record on a different name, or replace the CNAME with A records.
Target written as a URL or an IP
A CNAME target must be a plain hostname. Values like https://example.net/page or 192.0.2.10 are invalid. Drop the scheme and path, and if you only have an IP address, use an A record instead.
Missing trailing dot in a zone file
In a raw zone file, a target written without a final dot is treated as relative, so target.example.net becomes target.example.net.example.com. Most web control panels add the dot for you, but hand-edited zones need it.
Dangling CNAME after a service is removed
If you delete an app, bucket, or site on a third-party platform but keep the CNAME pointing to it, someone else may be able to claim that same resource and serve content on your subdomain. This is called subdomain takeover. Remove the CNAME at the same time you shut the service down.

Other record lookups

Frequently asked questions

Can I use a CNAME for my root domain?

Not under the DNS standards. The bare domain must hold SOA and NS records, and a CNAME cannot coexist with them. Use your DNS provider's ALIAS, ANAME, or CNAME-flattening feature, or point the apex at the service's IP addresses with A records.

Why does my CNAME lookup show no records?

Either the name has A records instead of a CNAME, your provider flattens the CNAME, or you looked up the wrong name. Check that you entered the full subdomain. If the source-of-truth row shows the CNAME but resolvers do not yet, the record is new and caches have not expired.

Can a CNAME point to another CNAME?

Yes. Resolvers follow the chain until they reach an address, but each extra step adds a lookup, and a loop makes the name fail entirely. MX and NS records are different: their targets must not be CNAMEs at all.

Does a CNAME redirect my website?

No. A CNAME only changes which server DNS sends visitors to. The address bar keeps showing your name, and the target server has to accept requests for it, including having a certificate that covers it. To change the URL visitors see, use an HTTP redirect on the web server.

How do I check what a subdomain points to?

Enter the subdomain above with CNAME selected to see its alias target. If no CNAME exists, switch to A to see the IP address it points to directly.