Skip to content
AdminKit

How do you find a dangling CNAME before it becomes a subdomain takeover?

A dangling CNAME still resolves in DNS but points at a cloud resource, CDN endpoint or hosting slot you've since deleted or stopped renewing, letting whoever claims that same name on the provider's side serve content from your subdomain instead; AdminKit's live DNS lookup tool shows exactly which target a CNAME currently points at, the first step in spotting one.

By AdminKit team, Netbase JSC · Updated

What a dangling CNAME actually is

A CNAME record, defined in RFC 1035, makes one domain name an alias for another — resolvers look up the target name instead of returning an address directly. It’s the standard way to point a subdomain at a service you don’t control the IP address for: a custom domain pointed at a CDN, a SaaS vendor’s hosting, or a marketing platform’s tracking domain are all common cases. A CNAME goes dangling when you stop using the underlying resource — delete the storage bucket, cancel the hosting plan, decommission the CDN distribution — but never remove the CNAME record itself. The alias still resolves; it just points at something that no longer exists on the other end, or that the provider may let a different customer claim.

Why it enables a subdomain takeover

Many cloud platforms let customers claim a hosting slot, bucket or app name on a first-come basis. If your dangling CNAME still points old-promo.example.com at a platform’s generic endpoint for a resource you deleted, anyone who notices and re-registers that same resource name on the provider’s side can start serving their own content from old-promo.example.com — a domain that still visibly belongs to you in the browser’s address bar, with your organization’s name attached. This is why removing the CNAME record at the same time you decommission the underlying resource matters as much as deprovisioning the resource itself. A wildcard DNS record pointed at a shared target carries a related risk: it can silently resolve subdomains that were never explicitly provisioned, masking exactly the kind of orphaned name this check is looking for.

How to check a specific subdomain today

AdminKit’s DNS lookup tool is live and resolves the CNAME record type directly. Look up the subdomain you’re concerned about and check what it currently points at — a target on a recognizable cloud storage, CDN or app-hosting domain that you don’t believe is still in active use is the signal worth chasing down.

Building an inventory, not just checking one name

AdminKit’s DNS lookup checks one name at a time; it doesn’t enumerate every subdomain of a domain automatically. A real review starts with a full list of subdomains you’ve actually published — your DNS provider’s own zone export is the most reliable source for that, since it’s the definitive list of every record you control — then running each CNAME target through the lookup above and comparing it against what you currently have provisioned in the relevant cloud or SaaS account.

Confirming it’s actually exploitable

A CNAME pointing somewhere unfamiliar isn’t automatically takeable — confirming that depends on the specific target provider. Many cloud and CDN providers show a distinctive error page (an explicit “no such bucket,” “domain not configured,” or similar message) when you browse directly to a dangling target, which is a strong signal the underlying resource is gone. Definitively confirming the name is claimable generally means attempting to register that exact resource name yourself with the target provider — AdminKit’s DNS lookup confirms the DNS pointer, not the destination service’s claim state, so treat an unfamiliar target as worth investigating rather than proof of an active risk on its own.

How to fix it

Remove the CNAME record the moment you decommission the resource it points to — make that step part of your deprovisioning checklist, not an afterthought. For CNAMEs you still need, keep an explicit inventory of what each one is supposed to point at so an unexpected target stands out immediately the next time you review it, rather than blending into a long, unreviewed zone file.

Other exposure checks worth running

If you’re reviewing DNS hygiene more broadly, see is your DNS resolver an open resolver; for mail infrastructure, see how to publish and test MTA-STS; and for a ports-focused check, see how to check if port 123 (NTP) is exposed. This guide sits in AdminKit’s DNS cluster alongside the live tools and glossary terms that back it.

This guide is general information, not a security audit of your specific network — see our disclaimer for what AdminKit's guidance does and does not commit to.

Frequently asked questions

What exactly makes a CNAME 'dangling'?

A CNAME record, defined in RFC 1035, makes one name an alias for another and tells resolvers to look up the target instead of returning an address directly. It becomes dangling when the subdomain's CNAME still points at a target you no longer control — a deleted cloud storage bucket, a decommissioned CDN distribution, a cancelled SaaS hosting slot — while the CNAME record itself was never removed.

How do I check a specific subdomain for this?

Run it through AdminKit's live DNS lookup tool, querying the CNAME record type for the subdomain in question. If it returns a target on a third-party platform (a cloud storage, CDN or app-hosting domain) that you don't recognize as currently in use, that's worth investigating further — start by checking whether that resource still exists in your own provider account.

Can I check every subdomain at once?

Not with a single click today — AdminKit's DNS lookup tool checks one name at a time rather than enumerating every subdomain of a domain automatically. A real review means first building an inventory of subdomains you actually have (from your DNS provider's own zone file export, which lists every record you've published, is the most reliable source), then checking each CNAME target against what you currently have provisioned.

How do I know a CNAME target is actually claimable, not just unfamiliar?

That depends on the specific provider the target belongs to, and AdminKit's DNS lookup only confirms what the CNAME points at, not the destination service's claim state. Many cloud and CDN providers return a distinctive error (an explicit 'no such bucket' or 'domain not configured' page) when you browse to a dangling target directly, which is a strong signal; definitively confirming it's claimable generally means attempting to provision that exact name yourself in the target provider, or removing the CNAME if you don't actually need it anymore.

Want AdminKit to watch this for you?

Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.

Huy Nguyen (David), Founder and CEO of Netbase JSC

Talk to an expert

Huy Nguyen (David), Founder & CEO, Netbase JSC

Ask whether this fix applies to your setup, or get a second pair of eyes on your DNS and mail records.