Dangling CNAME is the term for a CNAME record whose target hostname either doesn’t resolve at all or points to a third-party resource the current DNS owner no longer controls. It’s the precondition for a subdomain takeover.
Two Categories
- Abandoned target — CNAME points to
myapp.herokuapp.com, but Heroku app was deleted. Attacker re-registersmyapp, gets your subdomain’s traffic. - Broken target — CNAME points to a hostname that returns NXDOMAIN. Depending on the service, an attacker may be able to register that hostname and claim the traffic.
Detection at Scale
- Enumerate all subdomains via CT logs (e.g., crt.sh)
- Resolve each — flag any that return NXDOMAIN or a service-specific “does not exist” response body
- Report all CNAME chains that end in a third-party domain and confirm ownership of that endpoint
Fix
Periodic audits + a change-management rule: DNS records for third-party services get deleted as part of the service teardown, not after.
Related
Read what a subdomain takeover is, check the subdomain takeover glossary entry, and the CNAME record entry.