OnChainScans
Subdomain Takeover (Dangling CNAME)•NIST SP 800-189 Secure DNS Deployment• LIVE SCANNER EMBEDDED

How to Detect & Prevent Dangling CNAME Subdomain Takeover Attacks

Identify abandoned DNS alias pointers and reclaim vulnerable cloud endpoints before attackers exploit them.

Live Diagnostic Tool: Dangling CNAME & Subdomain Takeover ScannerFull Tool Page
Executive Answer & Impact Analysis

A subdomain takeover occurs when a DNS CNAME record points to an external cloud service (AWS S3, GitHub Pages, Heroku, Shopify, Zendesk) that has been deleted or unclaimed. An attacker can register the abandoned resource name with the provider and take full control of your branded subdomain.

Root Cause Analysis

Developers point a DNS CNAME to a cloud service during development or campaigns. When the cloud bucket or app is deleted, the DNS record is forgotten in DNS management, creating a dangling pointer.

Step-by-Step Resolution Procedure

1Scan Subdomain for Dangling Signatures

Use the Dangling CNAME Scanner above to verify whether your subdomain points to an unclaimed cloud target.

2Delete Orphaned DNS Records Immediately

Log in to your DNS provider (Cloudflare, Route 53, Namecheap) and purge any unused CNAME or A records.

3Implement Continuous DNS Audits

Regularly audit zone files against cloud provider provisioning states to eliminate stale records.

Verification Command or Config Pattern

TERMINAL / CONFIGRFC NIST SP 800-189 Secure DNS Deployment
; VULNERABLE: Pointing to deleted S3 bucket or GitHub repo
; assets.example.com. CNAME mycompany-old-bucket.s3.amazonaws.com.

; SECURE: Direct root address or managed verified endpoint
assets.example.com. CNAME d111111abcdef8.cloudfront.net.

Frequently Asked Remediation Questions

What can an attacker do with a taken over subdomain?

Attackers can serve phishing pages under your trusted brand name, steal session cookies scoped to parent domains (e.g. .example.com), and bypass CSP security policies.

Which cloud services are most vulnerable to takeover?

Amazon S3 buckets, GitHub Pages, Heroku apps, AWS Elastic Beanstalk, Zendesk Help Centers, Fastly CDN pools, and Surge.sh deployments.

How do I know if a CNAME is dangling?

If the target host returns a signature error like 'NoSuchBucket', 'There isn't a GitHub Pages site here', or 'No such app', the resource is unclaimed and vulnerable.

Does DNSSEC prevent subdomain takeover?

No. DNSSEC verifies cryptographic integrity of the DNS response itself, but cannot verify whether the third-party cloud resource actually exists.