What is subdomain takeover and how do you prevent it?

AdvancedConceptDNS
Answer

A DNS record (often a CNAME) still points to a cloud resource that was deleted, such as an S3 bucket, Elastic Beanstalk or Azure app name. An attacker claims that resource and now serves content on your subdomain, with your cookies in scope.

Prevent: remove DNS records when decommissioning, inventory records with automated scans (e.g., checking CNAME targets for NXDOMAIN or provider-specific error pages), and manage DNS as code so deletes are tied to resource lifecycle.

All Networking questions Roadmap: Networking for DevOps

More on DNS