XiaTools
DNS tool

CNAME Lookup

Check where a hostname points with its CNAME record, useful for CDN, email and SaaS setups.

The CNAME Lookup tool allows you to query the Domain Name System to check where a specific hostname points via a Canonical Name record. It traces redirection paths, helping you verify and troubleshoot your CDN, email, and SaaS integrations instantly.

What is it

A CNAME (Canonical Name) record is a type of resource record in the Domain Name System used to alias one domain name to another. Instead of mapping a hostname directly to an IP address, a CNAME record points your subdomain to a target domain name. When a resolver encounters a CNAME record, it restarts the query using the new target name. This mechanism is essential for managing infrastructure that frequently changes its underlying IP addresses, such as content delivery networks, cloud storage buckets, and third-party SaaS platforms.

Why it matters

Proper CNAME configuration is critical for modern web infrastructure and service delivery. When you point your custom domain to a third-party provider like a help desk, landing page builder, or CDN, you rely on CNAME records to route traffic correctly without exposing hardcoded IP addresses that might change. Incorrectly configured CNAMEs can lead to broken websites, failed SSL certificate validation challenges, and disrupted email delivery. Furthermore, understanding your CNAME chain helps you identify orphaned records that could pose security risks, such as subdomain takeover vulnerabilities where an attacker claims an abandoned external resource.

How to use this tool

  1. Navigate to the CNAME Lookup page on XiaTools.
  2. Enter your target hostname or subdomain in the input box, such as www.example.com or blog.example.com.
  3. Press the Check button to initiate the live DNS query across global name servers.
  4. Review the generated output to see the canonical name targets and resolution path.

How to read the results

The tool presents the DNS query results in a structured format, showing each hop in the redirection chain. For example, if you query www.example.com, the tool might return a result indicating that www.example.com is a CNAME pointing to example.cdnprovider.com, which ultimately resolves to an IP address. You will see the record type (CNAME), the Time to Live (TTL) value which determines how long resolvers cache the record, and the target destination. If no CNAME record exists, the tool will indicate that the hostname points directly to an A or AAAA record instead of an alias.

Common problems and how to fix them

CNAME Flattening Conflicts at the Root

A common issue occurs when attempting to create a CNAME record at the root domain, such as example.com. Standard DNS specifications do not allow a CNAME record to coexist with other records like MX or TXT at the apex.

; Incorrect at the root
example.com.    IN    CNAME    target.example.net.

To fix this, use an A record for the root domain or employ your DNS provider's proprietary CNAME flattening feature, which mimics a CNAME at the apex by dynamically returning IP addresses.

Multiple CNAME Redirection Chains

Chaining CNAME records, where sub1.example.com points to sub2.example.com which then points to target.com, introduces unnecessary latency and increases the risk of resolution failure.

; Inefficient chain
sub1.example.com.    IN    CNAME    sub2.example.com.
sub2.example.com.    IN    CNAME    target.com.

To fix this, update your DNS settings so that the initial hostname points directly to the final destination target, bypassing intermediate aliases.

Missing or Expired Target Validation

Sometimes third-party services require temporary CNAME records for domain ownership validation. If the service provider deletes their end of the target, your record becomes invalid.

To fix this, check the status of your integration with the external provider, ensure the target domain exists, and update or remove the orphaned CNAME record.

Best practices

Keep your DNS architecture clean by documenting every CNAME record and its intended business purpose. Regularly audit your subdomains to remove obsolete CNAME records that point to decommissioned SaaS providers or external servers, protecting your domain from dangling DNS security threats. Set appropriate TTL values based on how often you expect your infrastructure to change; use higher TTLs like 86400 seconds for stable setups to improve lookup speeds, and lower TTLs during migrations or IP updates.

Frequently asked questions

What is the difference between an A record and a CNAME record?

An A record maps a domain name directly to an IPv4 address, whereas a CNAME record maps a domain name to another domain name. CNAME records act as an alias rather than a direct pointer to network hardware.

Can I use a CNAME record on my root domain (apex domain)?

Standard DNS protocols prevent using a CNAME record on a root domain like example.com if other records exist. Most modern DNS providers offer an alias or flattening feature to work around this limitation.

Why does my CNAME lookup show an A record instead of a CNAME?

If the hostname you queried points directly to an IP address rather than an alias, the DNS returns an A or AAAA record. A hostname can either be a CNAME or have other record types, but they cannot coexist on the exact same name.

What is a CNAME chain and why should I avoid it?

A CNAME chain happens when a CNAME points to another CNAME, which then points to the final destination. This slows down page load times because the DNS resolver must perform multiple lookups before reaching an IP address.

What is a dangling CNAME record?

A dangling CNAME record points to an external service or cloud resource that has been deleted or unclaimed. This creates a security risk known as subdomain takeover, where malicious actors can claim the abandoned resource.

How long does it take for CNAME changes to update globally?

CNAME propagation depends on the Time to Live (TTL) value set on the previous record and the caching behavior of global DNS resolvers. It typically ranges from a few minutes to 24 hours.

CNAME Lookup guides

Related tools