If you’re seeing strange, spammy pages indexed under one of your subdomains you’re not imagining it. You could be facing a subdomain takeover, a sneaky and increasingly common security misstep that affects websites large and small.
We’ll explain exactly what a subdomain takeover is, how it happens, how to detect it, and the steps you can take to prevent it from ever happening again.
A subdomain takeover occurs when a subdomain (like blog.yoursite.com
) is still pointing to an external service — like GitHub Pages, Heroku, Shopify, or a retired CDN — but that service is no longer active or controlled by your account. If the DNS record still exists, but the service doesn’t, someone else can often claim it and serve their own content under your trusted domain.
To the outside world, it looks like that content is coming from blog.yoursite.com
. Search engines index it. Users might click it. And it may be full of SEO spam, phishing pages, or malicious code.
In short: it’s a ghost town with an open door, and someone else moved in.
Here’s the typical chain of events:
docs.yoursite.com
to it via a CNAME or A record.This can happen across dozens of platforms: GitHub, Heroku, Shopify, Bitbucket, WordPress.com, Amazon S3, Netlify, and more.
In some cases, attackers even set up redirect chains to malicious software, crypto scams, or spammy link farms.
You may have no idea it’s happened… until one of these signs shows up:
site:blog.yoursite.com
and see Chinese characters, casino links, or download pages.These are not harmless anomalies. They mean your brand is being hijacked from the inside out.
Follow this checklist to run a full audit:
Use tools like:
dig
and nslookup
scripts if you have accessLook for DNS records pointing to services that return:
Use automated tools like:
Run:
site:subdomain.yourdomain.com
If you see content you didn’t publish — you’ve got a problem.
This is the #1 fix. If a service is no longer in use, delete the associated CNAME or A record. Leaving it in place is like leaving your car unlocked with the keys on the seat.
Set up alerts when new subdomains are created or modified. Cloudflare, DNSFilter, and AWS Route 53 can all help with this.
Have a written policy for managing third-party integrations and how DNS changes are handled across teams. Include expiry dates for temporary services.
Make sure engineers and IT staff know the risks of deleting apps without deleting DNS, especially on platforms like:
Schedule scans quarterly (or monthly) using tools like Subjack, Subzy, or Bugcrowd’s monitoring stack.
Subdomain takeovers are subtle but dangerous. You might not notice until your domain reputation takes a hit, your search rankings tank, or your brand appears on a phishing blacklist.
The good news: they’re completely preventable. All it takes is regular cleanup, awareness, and a few tools to keep your DNS tidy and your domain in your control.
Want help auditing your subdomains or securing your DNS? Let’s talk.