DNS and subdomains: how it works
How name resolution works, what a subdomain is, why subdomains are not listed anywhere and which sources reveal them: certificate logs, passive DNS, search engines, domain records.
The resolution chain
When you type a name, a resolver asks the root servers who manages the extension, then the extension’s registry who manages the domain, and finally the domain’s authoritative servers for the answer. Answers stay cached for a time set by the TTL field: that is why an address change propagates in minutes or hours.
Subdomains
A subdomain is any name under the main domain: mail.example.com, shop.example.com, test.example.com. It can point to different servers and different providers. There is no public list of a domain’s subdomains: they have to be reconstructed from the traces they leave.
| Source or method | How it works | Type |
|---|---|---|
| Certificate logs | Every public certificate lists the names it protects and is recorded in searchable logs | Passive |
| Passive DNS | Archives keeping resolutions observed over time | Passive |
| Search engines and web archives | Indexed pages of subdomains | Passive |
| Domain records | MX, SPF, CNAME and other records mentioning names | Passive |
| Wordlist guessing | Direct queries for likely names such as admin or test | Active, generates traffic towards the target |
| Zone transfer | Request for the whole zone from the authoritative server, rarely allowed | Active |
DNS and subdomains: technique
The technique for analysing a domain’s DNS: basic records, reading SPF, DMARC and verification codes, subdomains from certificates and passive DNS, infrastructure, addresses behind CDNs, elements shared between domains.
The pages of this topic
Back to the overviewDNS and subdomains: sources
The sources for DNS research: authoritative servers, Certificate Transparency logs, passive DNS, search engines, web archives, SPF and DMARC records.
DNS and subdomains: tools
The tools for analysing DNS and subdomains: dig and nslookup, crt.sh, Amass and Subfinder, graphical maps, passive DNS platforms, link analysis tools.
DNS and subdomains: guided example
A guided example on three fake review sites: identical verification codes, the same email sending service, subdomains with the same naming pattern, a historical address shared with a marketing agency.
DNS and subdomains: limits
The limits of DNS research: CDNs and proxies, incomplete passive DNS, wildcard certificates, outdated data, services shared by millions of domains, active techniques that get noticed, legal limits on accessing systems.
DNS and subdomains: how to document
How to document DNS research: responses saved with date and resolver, exports from certificate logs, passive DNS captures with source and dates, a table of clues and their strength.
DNS and subdomains: frequently asked questions
Short answers to the most common questions about DNS, records and subdomains in open-source investigations.