Subdomain Takeover: Risk and Protection

An abandoned subdomain can be hijacked. Learn to detect and prevent this risk.

Subdomain takeover is a vulnerability where an attacker takes control of a legitimate subdomain via a "dangling" DNS record. Typical scenario: you have a CNAME blog.example.com pointing to your-blog.heroku.com, then you delete the Heroku blog but forget the CNAME. An attacker can create your-blog.heroku.com and take control of blog.example.com. This enables phishing, cookie theft, and attacks on your parent domain.

Signs of Vulnerability

At-Risk Services

Detection and Cleanup

  1. Audit all your subdomains: retrieve the complete list from your DNS provider.
  2. Identify CNAMEs: for each CNAME, verify the target exists and belongs to you.
  3. Test responses: curl each subdomain and look for telltale error pages.
  4. Cleanup: immediately delete DNS records pointing to services you no longer control.

Continuous Detection with MoniTao

MoniTao can identify takeover risks:

Takeover Prevention

FAQ - Subdomain Takeover

What can an attacker do with a takeover?

Host phishing on your domain, steal cookies if same-site, display malicious content under your brand.

Are all CNAMEs vulnerable?

No, only those pointing to services where anyone can create an account with a custom name (GitHub Pages, Heroku, etc.).

How to know if I've been taken over?

Visit your subdomains. If you see content you didn't create, it's a takeover.

Is takeover illegal?

Yes, it's considered computer intrusion in most jurisdictions. Report it to authorities.

Ready to Sleep Soundly?

Start free, no credit card required.