Remove dangling CNAME records (subdomain takeover)
अपडेट: 1 दिस॰ 2026
यह गाइड अभी अंग्रेज़ी में है।
What it means
A subdomain points (CNAME) to a third-party service (e.g. an old Heroku app, S3 bucket, GitHub Pages site) that no longer exists. Anyone can claim that resource and serve their own content on your subdomain.
Why it matters
Attackers can host phishing pages or malware on a real subdomain of your brand, read cookies scoped to your domain and bypass email/link filters.
How to fix it
- Confirm the target resource is unclaimed (the provider shows a "no such app/bucket" page).
- Delete the CNAME record, or re-claim the resource on the provider if you still need the subdomain.
- Add DNS cleanup to your decommissioning checklist.
Configuration examples
Any platform
DNS zone: delete the record
old-app.YOUR_DOMAIN. CNAME old-app.herokuapp.com.
Cloudflare
DNS -> Records -> find the CNAME -> Delete
Check your fix
dig +short CNAME sub.YOUR_DOMAINRe-run the DNS Security scan.
References
- https://github.com/EdOverflow/can-i-take-over-xyz
- https://developer.mozilla.org/docs/Web/Security/Subdomain_takeovers