Learn
What is a subdomain takeover?
A subdomain takeover happens when a DNS record points to a deprovisioned service an attacker can claim, letting them serve content on your domain. Learn how dangling DNS happens, why it's dangerous, and how to find and prevent it.
A subdomain takeover happens when an attacker gains control of one of your subdomains — not by hacking your servers, but by claiming an abandoned third-party resource that one of your DNS records still points to. The result is that an attacker can serve their own content on a hostname like support.yourcompany.com, with all the trust your real domain carries.
How a subdomain takeover happens
The root cause is a dangling DNS record. The typical sequence:
- You set up a service on a subdomain — say a help center — and create a CNAME record pointing help.yourcompany.com at the provider’s hostname.
- Later, you stop using that service and delete the account or resource — but the CNAME record is left behind in your DNS.
- The provider’s hostname is now unclaimed. An attacker registers that exact resource on the same provider, and because your CNAME still points to it, your subdomain now resolves to the attacker’s content.
No breach of your infrastructure is required. The vulnerability is the orphaned pointer.
Why it is dangerous
- Phishing with real credibility. Attackers host fake login or payment pages on a subdomain your customers and staff already trust — far more convincing than a lookalike domain.
- Cookie and session theft. Cookies scoped to your parent domain may be readable from the taken-over subdomain, enabling session hijacking.
- Allowlist and trust bypass. Systems that trust *.yourcompany.com — for CORS, OAuth redirects, or content embedding — can be abused.
- Reputation and deliverability damage if the subdomain is used for spam or malware.
Commonly affected services
Subdomain takeover is possible wherever you point a CNAME at a provider-controlled hostname whose underlying resource can be released and re-claimed: cloud and static hosting, CDNs, app/PaaS platforms, help-desk and documentation tools, and marketing/email services. The provider is not the problem — leaving the DNS record after decommissioning is.
How to detect subdomain takeover risk
- Build a complete subdomain inventory. You cannot audit records you do not know exist — continuous discovery is the foundation of external attack surface management.
- Resolve every record and identify CNAMEs pointing to third-party services.
- Check for the dangling fingerprint — a target that returns a provider’s “no such site / not found” page is a classic takeover candidate.
- Prioritize active risk — records pointing at known takeover-prone services that no longer resolve to a live resource.
How to prevent it
- Decommission in the right order: remove the DNS record first, or at the same time as you tear down the service — never leave the CNAME behind.
- Keep an owner for every DNS record so stale entries get cleaned up.
- Audit DNS regularly and treat unknown or unattributed records as suspect.
- Monitor continuously — new subdomains and services appear faster than manual audits can keep up.
The fastest way to see your exposure is a free external scan of your domain, which discovers subdomains and flags takeover and dangling-DNS risks alongside your other external exposures.
Frequently asked questions
What is a dangling DNS record?
A dangling DNS record is a DNS entry — usually a CNAME — that still points to a third-party service (like a cloud host, CDN, or SaaS app) that has been decommissioned or whose resource no longer exists. The DNS record is left behind pointing at nothing, and that orphaned pointer is what makes a subdomain takeover possible.
Why is a subdomain takeover dangerous if it's just a subdomain?
Because the content is served from YOUR domain. An attacker who claims the dangling resource can host phishing pages, malware, or scams on a hostname your customers trust, capture cookies scoped to your domain, and bypass allowlists that trust your domain. It is brand abuse with the credibility of your real domain behind it.
Which services are commonly vulnerable to subdomain takeover?
Any service where you point a CNAME at a provider-controlled hostname and the underlying resource can be released and re-claimed — cloud storage and static hosting, CDNs, app/PaaS platforms, support and documentation tools, and email/marketing services. The risk isn't the provider; it's leaving the DNS record after you stop using the resource.
How do I find subdomain takeover risks on my domain?
Inventory all your subdomains, resolve each one, and flag CNAMEs pointing to third-party services where the target resource no longer exists or returns a 'not found' fingerprint. A free SCRYPEX external scan discovers subdomains and surfaces takeover and dangling-DNS risks as part of mapping your external attack surface.