In short
A subdomain takeover occurs when a subdomain still points, via a DNS record, to a third-party service that no longer exists—such as cloud storage, web hosting, or a SaaS platform. An attacker recreates the resource under the same name with that provider and then publishes content of their choice on your subdomain, leveraging your brand’s credibility. The cause is almost always organizational: a service was deleted without the corresponding DNS record being removed.
How does this happen?
A team creates blog.your-domain.fr with a CNAME record pointing to a third-party hosting service. Months later, the blog is abandoned and the account with the hosting provider is deleted, but no one removes the DNS record. The subdomain now points to an unregistered name: anyone who registers it with the same hosting provider controls what appears on blog.your-domain.fr.
The same risk exists during creation if the DNS is configured before the resource is set up, and if NS records are delegated to a DNS zone that no longer exists.
What an attacker can do
- Hosting a phishing page on a genuine company subdomain, with a valid TLS certificate.
- Receiving cookies set for the parent domain, which the browser also sends to the subdomain.
- Bypassing policies that trust all subdomains (CORS, Content Security Policy, OAuth return URLs).
- Damaging the brand’s reputation by publishing illegal or misleading content.
How to Prevent It
- Delete the DNS record before the resource it points to, not the other way around.
- Maintain an inventory of subdomains and the third-party services to which they point.
- Regularly check for orphaned records (CNAME records pointing to nonexistent resources).
- Use the domain ownership verification mechanisms offered by providers, when available.
Frequently asked questions
How can I tell if my domain is at risk?
You must list all your subdomains (DNS zone, certificates published in Certificate Transparency logs) and verify that each target still exists and belongs to you. This is a standard step in attack surface mapping.
Sources
Find out where an attacker would get in.
Our AI agents actually attack your scope, fully automated, and hand you the proof of every vulnerability.
