Dangling DNS

The DNS Record You Forgot Can Be Someone Else's Website. Here's How to Find It.

When a cloud resource is deleted but the DNS record pointing at it stays, anyone can create a resource with the same name and serve their own content on your subdomain. It's called a subdomain takeover, and uptime monitors don't look for it.

Monitor your domains free

How It Happens

Someone sets up staging.yourcompany.com and points it with a CNAME at a cloud service: an Azure web app, an S3 bucket, a GitHub Pages site, a Heroku app. Months later the project ends and the app is deleted. Nobody touches DNS, because DNS lives somewhere else and the person who added the record has moved on.

Now staging.yourcompany.com points at a name that no longer exists. On many cloud services those names are first come, first served. Whoever creates yourcompany-staging.azurewebsites.net next gets your subdomain, with your company's name on it.

Why It's Worse Than It Sounds

  • Phishing on a real domain. A login page on staging.yourcompany.com passes every "check the address bar" test.
  • A valid certificate. The attacker can get a normal SSL certificate for the name, so the padlock shows.
  • Cookies and trust. Cookies scoped to .yourcompany.com may be sent to the hijacked subdomain, and some security setups trust every subdomain.
  • Nothing looks broken. Your main site stays up. Uptime checks stay green. Nothing alerts.

Where It Usually Hides

The records that dangle are the ones nobody looks at: old staging and test hosts, retired marketing microsites, docs and status pages that moved vendors, demo apps, and anything created for a single event or campaign. Big DNS zones with many people adding records are the usual suspects, and so are records added years ago by a vendor or agency.

Services where a deleted name can typically be re-registered include Azure (App Service, Cloud Services, Traffic Manager, Blob Storage, CDN), AWS (S3, Elastic Beanstalk), GitHub Pages and Heroku. Microsoft's own Azure documentation has a page on preventing dangling DNS entries for exactly this reason.

How to Find and Fix It

1. List every CNAME in your zones. Not just the hostnames you remember. Export the zone from your DNS host (in Cloudflare: DNS, then Export).

2. Check each target. Does the name it points at still resolve? If it points at a cloud service, open it in a browser: "There isn't a GitHub Pages site here", "NoSuchBucket" or "No such app" all mean the name is free to claim.

3. Delete or reclaim. If you don't use the subdomain, delete the DNS record. If you still need it, re-create the resource with the same name first, then decide.

4. Make deletion a two-step job. Remove the DNS record before you delete the cloud resource, never after. That one habit prevents almost all of these.

How DomainCat Helps

DomainCat now checks every domain you monitor for dangling DNS, every hour. It follows the CNAME chain (and, for sites behind Cloudflare, the real origin), and flags two things: takeover possible when the record points at a deleted resource on a service where the name can be claimed, and points at nothing when the target simply doesn't exist. You get one alert per finding, on every plan including Free.

Importing from Cloudflare goes further: it checks every CNAME in your Cloudflare zones, including the records you'd never think to monitor. It only looks. DomainCat does a DNS lookup and at most one web request, and never claims or creates anything.

Common Questions

What is a subdomain takeover?
A subdomain takeover happens when a DNS record (usually a CNAME) points at a cloud resource that has been deleted. Anyone who re-creates a resource with that name can serve their own content on your subdomain.

What is dangling DNS?
A DNS record that points at something that no longer exists, such as a deleted Azure web app, S3 bucket or GitHub Pages site. Some dangling records are just broken; on services where names can be re-registered, they can be taken over.

How do I check for subdomain takeover?
List every CNAME record in your DNS zones and check whether each target still exists. If a target on a cloud service returns a 'not found' page or doesn't resolve, delete the record or re-create the resource.

How do I prevent dangling DNS?
Remove the DNS record before deleting the cloud resource it points to, keep an inventory of who owns each record, and monitor your zones so a dangling record is caught the hour it appears.

Does DomainCat check for subdomain takeover on the free plan?
Yes. Dangling DNS checks and email alerts are included on every plan, including Free.

Related

Find the Record You Forgot

DomainCat checks every domain for dangling DNS every hour, alongside SSL (edge and origin), domain expiry and email security. Free for 5 domains.

Start monitoring free

Free plan · Up to 5 domains · No credit card required