
A subdomain takeover happens when a subdomain of your site points to an external service that no longer exists, and an attacker claims that service. The attacker then controls what visitors to your subdomain see.
Suppose your main domain is example.com and you host a project on a third-party platform such as Heroku or GitHub Pages. You create a DNS record so that work.example.com points to the platform's address, for example workhard.herokudns.com.
Later you stop using the service or the subscription ends, but the DNS record stays. The platform address is now free. An attacker registers it, and work.example.com starts serving the attacker's content.
A DNS record (often a CNAME) still points to a cloud service or third-party resource that was deleted, so anyone can claim it.
Remove DNS records when you decommission services, and audit your DNS regularly.
Try Vooki Pro free for 7 days
Find dangling DNS records before someone claims them. The trial unlocks every feature for 7 days, and scanning runs on your own machine.
Related: Secure cookie flags: Secure, HttpOnly and SameSite · Scoping a security scan correctly