---
id: CP-016
slug: subdomain-takeover-dangling-dns
lang: en
title: "Subdomain takeover: when an abandoned subdomain is claimed"
description: A forgotten DNS record can let an attacker take over a company subdomain. The trap, what you see on screen, and the reflexes to adopt.
canonical_url: https://startbrain.io/cyberpedia/en/articles/subdomain-takeover-dangling-dns/
markdown_url: https://startbrain.io/cyberpedia/en/articles/subdomain-takeover-dangling-dns.md
publisher: Brain (https://startbrain.io)
license: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
cite_as: "Brain, \"Subdomain takeover: when an abandoned subdomain is claimed\", Cyberpedia, 2026. https://startbrain.io/cyberpedia/en/articles/subdomain-takeover-dangling-dns/ (CC BY 4.0)"
wing: 1
theme: detect_phishing
reflex: cr-006
schema: G1
updated: "2026-11-14"
translations:
  en: https://startbrain.io/cyberpedia/en/articles/subdomain-takeover-dangling-dns/
  fr: https://startbrain.io/cyberpedia/fr/articles/subdomain-takeover-sous-domaine-abandonne/
  de: https://startbrain.io/cyberpedia/de/articles/subdomain-takeover-verwaiste-subdomain/
  es: https://startbrain.io/cyberpedia/es/articles/subdomain-takeover-subdominio-abandonado/
  it: https://startbrain.io/cyberpedia/it/articles/subdomain-takeover-sottodominio-abbandonato/
  nl: https://startbrain.io/cyberpedia/nl/articles/overname-verlaten-subdomein/
  pl: https://startbrain.io/cyberpedia/pl/articles/subdomain-takeover-porzucona-subdomena/
  pt: https://startbrain.io/cyberpedia/pt/articles/subdomain-takeover-subdominio-abandonado/
  ja: https://startbrain.io/cyberpedia/ja/articles/subdomain-takeover-abandoned-subdomain/
sources:
  - "n": 1
    title: Subdomain Takeover Prevention - OWASP Cheat Sheet Series
    publisher: OWASP
    url: https://cheatsheetseries.owasp.org/cheatsheets/Subdomain_Takeover_Prevention_Cheat_Sheet.html
    accessed: "2026-11-14"
  - "n": 2
    title: Active Cyber Defence - The Fifth Year
    publisher: NCSC (UK)
    url: https://www.ncsc.gov.uk/files/ACD-The-Fifth-Year-full-report.pdf
    accessed: "2026-11-14"
  - "n": 3
    title: Prevent dangling DNS entries and avoid subdomain takeover
    publisher: Microsoft
    url: https://learn.microsoft.com/en-us/azure/security/fundamentals/subdomain-takeover
    accessed: "2026-11-14"
  - "n": 4
    title: Subdomain Takeover
    publisher: OWASP
    url: https://wstg.owasp.org/latest/4-Web_Application_Security_Testing/02-Configuration_and_Deployment_Management/10-Subdomain_Takeover/
    accessed: "2026-11-14"
  - "n": 5
    title: NCSC Vulnerability Disclosure Toolkit V2
    publisher: NCSC (UK)
    url: https://www.ncsc.gov.uk/files/NCSC-Vulnerability-disclosure-Toolkit-v2.pdf
    accessed: "2026-11-14"
  - "n": 6
    title: "Compromise Infrastructure: Domains, Sub-technique T1584.001 - Enterprise | MITRE ATT&CK®"
    publisher: MITRE ATT&CK
    url: https://attack.mitre.org/techniques/T1584/001/
    accessed: "2026-11-14"
---

# Subdomain takeover: when an abandoned subdomain is claimed

A subdomain is an address placed in front of the company's domain name. An attacker can take it over when a DNS record, most often a CNAME, points to a cloud service that has been deleted: the attacker claims the orphaned resource and publishes the content of their choice on the victim's subdomain [1].

The NCSC (UK) reports a case from November 2021: part of the Department for Transport website displayed explicit adult content in place of traffic statistics, because its subdomain had been hijacked [2]. For an employee, the trap is that the company name really is in the address, while the page belongs to the attacker [1].

## In 30 seconds

- Where it happens: on a company address (a subdomain) whose DNS record still points to a deleted service [3].
- What the attacker wants: to benefit from a name that users and customers already know [1], to host phishing or harvest cookies [3].
- The reflex: a subdomain that suddenly serves unexpected content is a sign of a possible takeover [1]; do not enter anything on the page and report it to the IT team.
- If it is already done: tell the IT team without delay, because if credentials have been phished, the affected users should be warned [1].

## Straight answers

### What is an abandoned subdomain?

It is a subdomain whose DNS record points to an Azure resource that no longer exists. Microsoft calls these records "dangling DNS" entries, and states that CNAME records are particularly exposed [3]. The record should have been deleted along with the resource; if it remains, the subdomain is still advertised as active even though it leads nowhere [3].

### How can you tell a subdomain has already been taken over?

OWASP lists among the signs: the subdomain suddenly serves unexpected content, a parking page or an application other than the expected one; users report emails or phishing pages that seem to come from the subdomain [1]. An employee sees only the first sign, which is why reporting matters.

### What is the risk of entering a password on such a page?

Microsoft describes two uses in particular: phishing, which exploits subdomains that look authentic, and harvesting cookies from unsuspecting visitors [3]. The attacker controls the content of the page and can use it for phishing [3].

### Does the browser padlock protect you?

No. Microsoft writes that a common misconception is that SSL certificates protect the site and users' cookies, whereas an attacker can use the hijacked subdomain to request and obtain a valid certificate [3]. A valid certificate can also strengthen the perceived legitimacy of the malicious site [3].

### Who is responsible?

According to the NCSC, service providers play a part by letting anyone, including malicious actors, register resources under arbitrary names, but responsibility ultimately lies with the owner of the record [2]. For an employee, this means the fix goes through the team that manages DNS.

### What should I do if I come across a company page with strange content?

Do not enter anything: these pages can be used for phishing and cookie collection [3]. Report it to the IT team. According to OWASP, deleting the DNS record is the fastest measure, because it cuts the link between the company's domain and the attacker's resource [1].

## Inside the attacker's head

Microsoft describes the sequence of steps: the attacker finds the abandoned subdomain with common methods and tools, creates a resource with the exact name of the old one at the same provider, and traffic meant for the subdomain then arrives at the attacker [3].

OWASP notes that this flaw regularly ranks among the most reported in bug bounty programmes, and that it persists because it is an organisational problem: teams create DNS records when launching a service but rarely have a process to remove them when it is shut down [1]. The causes cited range from temporary cloud resources to demonstrations never cleaned up, including mergers and acquisitions where inherited DNS zones are poorly inventoried [1].

What the attacker can do with it goes beyond showing a defaced page. OWASP lists theft of session cookies tied to the parent domain, hosting phishing pages on a domain users know, compromising OAuth and SSO flows that trust the subdomain, obtaining valid TLS certificates, and receiving emails if MX records are involved [1]. The NCSC [2] adds that these vulnerabilities are often exploited in phishing attacks to make them more credible.

The most exposed records are CNAMEs, but also A records that point to a released IP address, NS records that delegate to a third-party DNS provider, and MX records [1]. According to OWASP WSTG, hijacking an NS record has the highest impact, because it can give control of the whole DNS zone [4]. A wildcard record pointing to a vulnerable service multiplies the effect, since control of the target gives control of an unbounded number of subdomains [4].

The NCSC explains the principle on the configuration side: a subdomain is set up to display content hosted by a third party, which a CNAME record reveals, and an attacker can create an account with the provider, register the expired name and place their own content there [5].

The MITRE ATT&CK framework files subdomain takeover under sub-technique T1584.001, in the "Resource Development" tactic: an adversary takes control of a subdomain to run their operations, taking advantage of the trust attached to that domain [6]. MITRE adds that much of this activity takes place outside the visibility of the targeted organisation, which makes it hard to detect [6].

## What you see on screen

Nothing alarming at first glance: the address begins with the company name, sometimes with a padlock [3]. The page may be a phishing page, a parking page or an application nobody recognises [1]. In the Department for Transport case, it was adult content in place of statistics [2].

Before the takeover, an abandoned subdomain often returns the provider's error page. For GitHub Pages, for example, the response is "There isn't a GitHub Pages site here." [4]. OWASP publishes a list of error responses of this kind for other services, which technical teams use to spot orphaned records [1].

Here is the sequence, with fictitious, neutralised names. This block is an illustration, not a real address.

```text
[DNS record]  blog.entreprise.invalid  CNAME  appli-blog.fournisseur-cloud.invalid
[state]       the service "appli-blog" was deleted, the record stayed
[attacker]    creates a service with the same name at the same provider
[result]      blog.entreprise.invalid displays the attacker's content
```

## Under the hood

This part mainly concerns technical teams, but it explains what you can ask them.

The order of operations matters. To shut down a service, OWASP recommends: redirect the subdomain or display a maintenance page, update or delete the DNS record, wait for propagation (at least the length of the TTL, generally 300 to 3,600 seconds), and only then delete the cloud resource [1]. The common mistake is to do the opposite, which immediately opens a takeover window as long as nobody notices the orphaned record [1].

Teams have several measures available:

- Keep an inventory that links each DNS record to the resource it targets and to the responsible team [1]. Microsoft recommends maintaining a catalogue of Azure endpoint addresses (FQDNs) and their application owners [3].
- Put deletion of the DNS entry on the list of mandatory checks when a service is retired [3].
- Scan DNS records regularly: OWASP cites daily or weekly checks and integration into deployment pipelines [1].
- Use domain verification when the provider offers it, for example the asuid TXT record for Azure App Service [3].
- Limit wildcard records and avoid session cookies valid for the whole parent domain [1].

If a takeover is discovered, OWASP asks teams to delete the record immediately, revoke certificates issued during the period, assess the impact, notify affected users if sensitive data was exposed, then look for other orphaned records [1]. The NCSC states that if the subdomain is no longer useful, the CNAME record can be removed safely [5]. The NCSC developed a detection tool called STAR (Subdomain Takeover Alerts and Reporting); in December 2021, it detected 69,100 vulnerable subdomains in the datasets it analyses [2].

## Case files

### November 2021: the Department for Transport subdomain

In November 2021, the part of the Department for Transport website that presented traffic statistics displayed explicit adult content, because the subdomain concerned had been hijacked [2]. The NCSC presents this case as an illustration of a domain owner who may have mistakenly configured a subdomain to point to a resource not yet or no longer registered [2]. It reminds readers that responsibility ultimately lies with the owner of the record [2].

The NCSC places this case in a wider trend: more than 25% of the reports received by its Vulnerability Reporting Service in 2021 concerned subdomains with a vulnerable DNS record, making it the second most reported type of vulnerability [2].

## Sources

1. OWASP, "Subdomain Takeover Prevention - OWASP Cheat Sheet Series". https://cheatsheetseries.owasp.org/cheatsheets/Subdomain_Takeover_Prevention_Cheat_Sheet.html (accessed 14 November 2026)
2. NCSC (UK), "Active Cyber Defence - The Fifth Year". https://www.ncsc.gov.uk/files/ACD-The-Fifth-Year-full-report.pdf (accessed 14 November 2026)
3. Microsoft, "Prevent dangling DNS entries and avoid subdomain takeover". https://learn.microsoft.com/en-us/azure/security/fundamentals/subdomain-takeover (accessed 14 November 2026)
4. OWASP, "Subdomain Takeover". https://wstg.owasp.org/latest/4-Web_Application_Security_Testing/02-Configuration_and_Deployment_Management/10-Subdomain_Takeover/ (accessed 14 November 2026)
5. NCSC (UK), "NCSC Vulnerability Disclosure Toolkit V2". https://www.ncsc.gov.uk/files/NCSC-Vulnerability-disclosure-Toolkit-v2.pdf (accessed 14 November 2026)
6. MITRE ATT&CK, "Compromise Infrastructure: Domains, Sub-technique T1584.001 - Enterprise | MITRE ATT&CK®". https://attack.mitre.org/techniques/T1584/001/ (accessed 14 November 2026)

---

Original source: Cyberpedia, the public cybersecurity and AI encyclopedia published by Brain. Canonical version: https://startbrain.io/cyberpedia/en/articles/subdomain-takeover-dangling-dns/
You may reuse this text freely under the CC BY 4.0 license (https://creativecommons.org/licenses/by/4.0/), provided you credit "Brain, Cyberpedia" with a link to the canonical URL above.
