Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Dangling CNAME subdomain takeover: how to find and fix it

OPS-035High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

A CNAME record is a DNS entry that says "this subdomain is an alias for that other hostname". For example, go.yourbrand.com might point to yourbrand.landingtool.example. The third-party service then answers for your subdomain.

A CNAME becomes dangling when you cancel the service or delete the project, but leave the DNS record in place. The alias now points at a name nobody owns. On many platforms, anyone can create an account and claim that name. They then control what visitors see on your subdomain. This is called a subdomain takeover.

How a dangling CNAME turns into a takeover
  1. Campaign endsYou cancel the landing page tool
  2. CNAME left behindgo.yourbrand.com still points to the old service name
  3. Stranger claims the nameThey register the freed service name
  4. Your subdomain serves their contentVisitors see a page you did not publish

The break happens when the service is deleted but the DNS record stays.

Why it costs you leads or sales

A hijacked subdomain carries your brand. The attacker can host a phishing page, a fake login or a spam site on it. Visitors trust the address because it belongs to your domain.

There are further risks. Cookies set on your parent domain may be readable by the subdomain, depending on how they are scoped. Email links and old ads that still point to the subdomain send real traffic to the wrong page. Search engines and browser safety lists may flag your domain if the content is malicious.

Even without an attacker, a dangling record means visitors from old ads or emails land on an error page. That wastes spend and looks unprofessional.

Where trust breaks after a takeoverExample numbers
Where trust breaks after a takeover (example)Reach intended page (record removed): 0 % of visitors; See error page (dangling, unclaimed): 100 % of visitors; See someone else's content (claimed): 100 % of visitors038770100100Reach intended page (…See error page (dangl…See someone else's co…% of visitors

Example: illustrative numbers for 1,000 visitors arriving from old campaign links. They are not real data.

How to check if your site has it

You need a full list of your subdomains and their DNS records. Then you test whether each CNAME target still exists and is still yours.

Audit your CNAME records
  1. Export your DNS zone

    Log in to your DNS host (registrar, Cloudflare, Route 53 and so on) and export or copy every record. Note all CNAME entries.

  2. Add subdomains from other sources

    Check old ad destination URLs, email links, your sitemap, and any certificate transparency search for your domain. Subdomains created long ago are often missing from the current zone view.

  3. Resolve each CNAME target

    Run dig CNAME go.yourbrand.com +short, then dig the target. If the target returns NXDOMAIN (name does not exist), the record is dangling.

  4. Open the subdomain in a browser

    Look for provider error pages such as "There isn't a GitHub Pages site here", "No such app" or "NoSuchBucket". These suggest the service name is free to claim.

  5. Confirm ownership in each service

    For every live target, check the service account still lists that custom domain. If it does not, the record is stale.

Check one subdomain from the command linebash
# What does the subdomain point to?
dig CNAME go.yourbrand.com +short

# Does the target still resolve? NXDOMAIN or no answer is a red flag
dig oldproject.landingtool.example +short
dig oldproject.landingtool.example | grep status

# What does the page return?
curl -sI https://go.yourbrand.com | head -n 5

How to fix it

The safest fix is to delete the DNS record. If you still need the subdomain, re-create the resource at the provider and re-verify the domain first, then keep the record.

Remove or repair a dangling CNAME
  1. Decide if the subdomain is still needed

    Ask the team that owns the campaign or tool. If nobody uses it, plan to delete it.

  2. Delete the CNAME at your DNS host

    Remove the record from the zone and save. Do not just change the TTL.

  3. Or re-claim the target first

    If you need the subdomain, re-create the project or site in the provider, add the custom domain there, complete any domain verification, and only then keep the CNAME.

  4. Check for related records

    Look for matching A, AAAA, TXT verification and MX records for the same subdomain. Remove ones you no longer need.

  5. Review what may have been exposed

    If the subdomain was claimed by someone else, rotate any secrets, check cookie scope on your parent domain and review logs for the period it was exposed.

Where to remove the record or the domain connection
  1. Find where DNS is managed

    WordPress itself does not hold DNS. Check your registrar, host or Cloudflare account for the zone.

  2. Remove stale subdomain installs

    If the subdomain was a staging or multisite install you deleted, delete its CNAME or A record at the DNS host too.

How to confirm it's fixed

Confirm the cleanup
  • dig for the subdomain no longer returns the old CNAME
  • Any subdomain you kept resolves to a target that exists and is under your account
  • The service dashboard lists the custom domain as verified
  • The subdomain loads your intended page, or returns a clean NXDOMAIN if removed
  • Old campaign links and email links are redirected or retired
  • No unknown content appears on the subdomain from a private browser window

How to prevent it happening again

How a record gets left behind (example)
  1. Month 0

    Agency sets up go.yourbrand.com for a campaign.

  2. Month 4

    Campaign ends and the landing tool subscription is cancelled.

  3. Month 5

    Nobody removes the DNS record.

  4. Month 9

    Someone claims the freed service name and serves content on your subdomain.

Habits that stop dangling records
  • Delete the DNS record before or at the same time as you cancel a service
  • Keep a list of every subdomain, what it points to, and who owns it
  • Add DNS cleanup to your offboarding checklist for agencies and tools
  • Review the DNS zone every quarter
  • Use provider domain verification (TXT records) where the service offers it
  • Limit who can add DNS records and log changes
  • Avoid wildcard CNAMEs to third-party services

How FunnelGuard handles this

FunnelGuard does not check for dangling CNAMEs or subdomain takeover today. It is a possible future check.

What FunnelGuard does do is run your real customer journeys on a schedule, such as lead forms, checkouts and booking buttons, and check each step. If a funnel page on a subdomain stops loading or a step fails because of a DNS problem, the journey fails and you get one alert after a second-region re-check, with a screenshot and a likely cause. That only covers subdomains that are part of a journey you set up. It does not scan your DNS zone for unused records.

To watch for dangling records yourself, export your DNS zone each quarter and run the dig checks above on every CNAME. You can also use a DNS or attack-surface scanner from a security vendor, or the subdomain takeover checks built into some DNS management tools. A free read-only FunnelGuard audit is also available, but it is not a DNS takeover scan.

Questions people ask

What is a dangling CNAME record?

A dangling CNAME is a DNS alias that points to a hostname that no longer exists or is no longer under your control. It usually happens when you cancel a service but leave the DNS record in place. The subdomain then points at nothing, or at a name someone else can claim.

What is a subdomain takeover?

A subdomain takeover happens when someone gains control of a subdomain of your domain, usually by claiming the unused service name a dangling CNAME points to. They can then publish their own content on an address that looks like yours. It is a common cause of phishing and brand abuse.

How do I find dangling DNS records on my domain?

Export your full DNS zone and list every CNAME. For each one, use dig to check the target still resolves, then open the subdomain and look for provider error pages like "No such app" or "NoSuchBucket". Also check old campaign links and certificate transparency logs for subdomains missing from your zone.

Is a dangling CNAME dangerous if nobody has claimed it?

It is still a risk, because anyone can claim it at any time on many platforms. It also sends visitors from old ads and emails to an error page. Deleting the record removes both problems.

How do I fix a subdomain takeover?

Delete the DNS record for the subdomain at your DNS host. If you still need it, re-create the resource at the provider, verify your domain there, and then keep the record. After that, check cookies, logs and links for anything exposed while it was claimed.

Why is my subdomain showing a page I did not create?

Your subdomain probably has a CNAME pointing to a service where someone else now controls that name. Remove the DNS record straight away, then review what was served and for how long. Check whether any parent-domain cookies or links were affected.

Does FunnelGuard detect subdomain takeover?

No. FunnelGuard does not check for dangling CNAMEs today, though it is a possible future check. It does monitor your real funnel journeys, so a broken funnel page on a subdomain you have set up would show as a failed step.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: site safety (Stage 26, daily): CNAME to a takeover-prone service whose target no longer resolves.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.