Cybersecurity

Subdomain Discovery Using Certificate Transparency Logs

Learn how security professionals use Certificate Transparency logs to discover hidden subdomains, map attack surfaces, and conduct thorough security reconnaissance. Includes defensive strategies to protect sensitive infrastructure.

By Inventive HQ Team

Certificate Transparency logs let you discover an organization's subdomains by reading the hostnames listed in its public SSL/TLS certificates. Every time a Certificate Authority issues a certificate, it must publish it to public, append-only CT logs (defined in RFC 6962), and each certificate lists all the hostnames it protects in its Common Name and Subject Alternative Name (SAN) fields. Search a CT log aggregator such as crt.sh for %.example.com, extract every SAN, deduplicate the results, and validate which hosts are live — and you have a map of subdomains that never appear in DNS zone transfers, search results, or links on the main site, including forgotten dev, staging, and admin hosts.

That is the summary an AI overview gives you. What it can't give you is the working pipeline: the exact crt.sh query and jq one-liner, the tool table that shows when to reach for subfinder versus amass versus Censys, and — because CT logs are permanent — the defensive playbook for the subdomains you've already leaked. This guide covers all three, from both the offensive (attack surface mapping) and defensive (exposure reduction) sides.

Try our free Certificate Transparency Lookup to enumerate subdomains for any domain from CT logs instantly.

Loading interactive tool...

Why Subdomain Discovery Matters

Before diving into the technical details, it's important to understand why subdomain discovery is such a critical component of security reconnaissance:

Attack Surface Mapping: Every subdomain represents a potential entry point into your infrastructure. Forgotten development servers, misconfigured staging environments, and orphaned services all expand your attack surface.

Asset Inventory: Many organizations lack complete inventories of their digital assets. CT logs provide an authoritative record of all subdomains that have had SSL certificates issued.

Shadow IT Detection: Departments often spin up services outside the purview of central IT. CT logs can reveal these shadow IT assets before they become security liabilities.

Vulnerability Assessment: Security teams need to know about all subdomains to ensure they're properly secured, patched, and monitored.

How Certificate Transparency Enables Subdomain Discovery

When a Certificate Authority issues an SSL/TLS certificate for a domain or subdomain, it must log the certificate in public Certificate Transparency logs. These logs contain crucial information that makes subdomain discovery possible:

Subject Alternative Names (SANs): Modern SSL certificates include Subject Alternative Names that list all domains and subdomains the certificate is valid for. A single certificate might protect dozens of subdomains.

Historical Records: CT logs are append-only and permanent, meaning they contain historical records of all certificates ever issued, including expired ones. This reveals subdomains that may no longer be actively used but could still exist.

Near Real-Time Updates: CT logs are updated within seconds to minutes of certificate issuance, providing current information about an organization's infrastructure.

The Subdomain Discovery Process

Here's how security professionals use CT logs for comprehensive subdomain discovery. The pipeline is always the same four moves — query the logs, extract the hostnames, deduplicate them, then validate which are live:

The CT-log subdomain discovery pipeline Four sequential stages: query Certificate Transparency logs, extract SAN hostnames, deduplicate and filter, then validate which hosts are live. An amber marker flows left to right through the stages. From CT log to validated subdomain list STEP 1 Query CT logs crt.sh / Censys API STEP 2 Extract SANs CN + SAN hostnames STEP 3 Dedupe + filter drop wildcards/dupes STEP 4 Validate live DNS + HTTP probe

Step 1: Query CT Logs Start by querying public CT log aggregators like crt.sh—or our Certificate Transparency Lookup—with your target domain. A search for %.example.com returns all certificates containing subdomains of example.com (the % is a SQL wildcard; URL-encoded it becomes %25). crt.sh can return JSON directly, so the entire query-extract-dedupe flow fits in one line:

# Every subdomain crt.sh has ever seen a certificate for, deduplicated
curl -s 'https://crt.sh/?q=%25.example.com&output=json' \
  | jq -r '.[].name_value' \
  | sed 's/^\*\.//' \
  | sort -u

The sed step strips the leading *. from wildcard entries so they collapse into the base name. For scripted attack-surface work, a dedicated tool aggregates many CT sources at once — for example, subfinder -d example.com -all -silent pulls crt.sh, Censys, Cert Spotter, and dozens more in a single pass.

Step 2: Parse Certificate Data Extract all unique subdomains from the returned certificates. This includes parsing:

  • Common Name (CN) field
  • Subject Alternative Names (SANs)
  • All domain variations listed in the certificate

Step 3: Filter and Deduplicate Remove duplicate entries and filter out wildcard certificates that don't reveal specific hostnames.

Step 4: Validation Verify which discovered subdomains are currently active through DNS resolution and HTTP/HTTPS probes.

Step 5: Categorization Categorize discovered subdomains by function:

  • Production services
  • Development/staging environments
  • Administrative interfaces
  • API endpoints
  • Third-party integrations

Types of Subdomains Discovered Through CT Logs

CT logs reveal various categories of subdomains, each with different security implications:

Public-Facing Services: Standard production subdomains like www.example.com, blog.example.com, or shop.example.com. These are typically well-maintained and secured.

Development and Staging: Subdomains like dev.example.com, staging.example.com, or test.example.com. These often have weaker security controls and may contain production-like data.

Administrative Interfaces: Subdomains such as admin.example.com, portal.example.com, or dashboard.example.com. These represent high-value targets for attackers.

Internal Services: Subdomains like vpn.example.com, mail.example.com, or intranet.example.com that reveal internal infrastructure.

Legacy and Orphaned Services: Old subdomains that may no longer be actively maintained but remain accessible, potentially running outdated software with known vulnerabilities.

Third-Party Integrations: Subdomains pointing to third-party services like support.example.zendesk.com, revealing technology stack and vendor relationships.

Advanced Reconnaissance Techniques

Security researchers employ several advanced techniques when working with CT logs:

Wildcard Certificate Analysis: While wildcard certificates (*.example.com) don't reveal specific subdomains, they indicate the organization uses dynamic or numerous subdomains in that namespace.

Organization Pivoting: Taking the Organization (O) field from a discovered certificate and re-querying CT logs for that organization name reveals other domains and assets that may not share the same top-level domain.

Certificate Authority Analysis: Examining which CAs an organization uses can reveal corporate relationships and preferred vendors.

Temporal Analysis: Tracking certificate issuance patterns over time can reveal infrastructure changes, new service launches, or migration activities.

Multi-Level Subdomain Discovery: Don't stop at second-level subdomains. Query for %.%.example.com to discover third-level subdomains like api.staging.example.com.

Advertisement

Real-World Examples and Statistics

The scale of subdomain discovery through CT logs is significant:

Massive Datasets: Public CT log aggregators index billions of logged certificates covering hundreds of millions of unique hostnames — and the total only grows, because the logs are append-only.

Large Organizations: Fortune 500 companies often have hundreds to thousands of subdomains discoverable through CT logs.

Hidden Services: A significant share of discovered subdomains — often cited at around a third — are not linked from the main website or easily found through traditional crawling, which is precisely why CT-based enumeration surfaces assets other techniques miss.

Security Implications: Offensive Perspective

From an attacker's perspective, CT logs provide invaluable reconnaissance data:

Pre-Attack Intelligence: Before launching attacks, adversaries use CT logs to map the entire attack surface, identifying the most promising targets.

Credential Stuffing Targets: Discovering login portals through subdomain enumeration enables targeted credential stuffing attacks.

Vulnerability Scanning: Attackers prioritize scanning discovered subdomains for known vulnerabilities, misconfigurations, and outdated software.

Social Engineering: Subdomain information helps craft convincing phishing campaigns that reference legitimate internal systems.

Security Implications: Defensive Perspective

From a defensive standpoint, understanding how attackers use CT logs is crucial for protection:

Asset Management: Use CT log discovery as part of your asset management process to ensure all subdomains are inventoried and secured.

Continuous Monitoring: Regularly query CT logs for your domains to discover shadow IT and unauthorized certificate issuance.

Security Testing: Include all discovered subdomains in vulnerability assessments and penetration tests.

Decommissioning: Identify and properly decommission old subdomains that appear in CT logs but are no longer needed.

Defensive Strategies to Limit Information Disclosure

While CT logs are public and permanent, organizations can employ several strategies to minimize information disclosure:

1. Wildcard Certificates The most effective strategy is using wildcard certificates (*.example.com) instead of listing specific subdomains. A wildcard certificate is logged just once under its wildcard name, obscuring the specific internal hostnames it protects.

Limitations: Wildcard certificates don't work for multi-level subdomains. *.example.com covers api.example.com but not v2.api.example.com.

2. Strategic Subdomain Naming Avoid using sensitive or revealing names in subdomains that require public certificates:

Bad: payroll.example.com, hr-portal.example.com, customer-database.example.com Better: service1.example.com, portal2.example.com, app3.example.com

3. Internal Certificate Authorities For purely internal services, use private/internal Certificate Authorities instead of publicly trusted CAs. Certificates from internal CAs don't appear in public CT logs.

Requirements: All clients must trust your internal CA, which may not be feasible for services accessed by external users.

4. CAA Records Implement DNS Certification Authority Authorization (CAA) records to specify which CAs are authorized to issue certificates for your domain. While this doesn't prevent information leakage, it dramatically reduces the risk of unauthorized certificates.

5. Network Segmentation Even if subdomains are discovered, proper network segmentation and access controls ensure attackers can't easily reach internal services.

6. Regular Audits Conduct regular audits of CT logs for your domains to identify:

  • Unauthorized certificates
  • Shadow IT services
  • Forgotten or orphaned subdomains
  • Potential security exposures

Permanence of CT Logs: What You Need to Know

A critical fact about Certificate Transparency logs: certificates cannot be removed from CT logs. The logs are designed to be append-only and immutable, which is a core feature of their security model.

Implications:

  • Information disclosure is permanent
  • Historical subdomains remain discoverable indefinitely
  • Planning before certificate issuance is crucial
  • Mistakes cannot be undone

This permanence underscores the importance of thoughtful certificate management and subdomain naming conventions.

Tools for CT Log Subdomain Discovery

Security professionals rarely rely on a single source. crt.sh is the fastest for a manual look; subfinder and amass aggregate CT logs with many other passive sources for breadth; Censys and Cert Spotter add enrichment and real-time monitoring. Here is when to reach for each:

Source / ToolTypeHow it uses CTBest for
crt.shWeb + JSON APISectigo-run search indexing all major CT logsFast manual lookups; ?q=%.domain&output=json scripting
CensysWeb + APIIndexes CT logs plus internet-wide scan dataEnriched context (open ports, ASN, geo) and org pivoting
Cert Spotter (SSLMate)API + monitorWatches CT logs directlyReal-time alerts when a new cert appears for your domain
certspotter (CLI)CLIQueries/monitors CT logsScripted, cron-driven monitoring of your own domains
subfinderCLIAggregates crt.sh, Censys, Cert Spotter + dozens moreFast passive enumeration; the default recon workhorse
amassCLICT logs + DNS brute-force + 80-plus data sourcesDeep, thorough attack-surface mapping

Which should you use? For a one-off check, use crt.sh (or our Certificate Transparency Lookup). For an engagement, run subfinder first for speed, then amass enum when you need maximum coverage. Add Cert Spotter or a scheduled crt.sh query to your own domains so you learn about new certificates before an attacker does.

Best Practices for Organizations

To balance security with operational needs:

1. Establish Certificate Policies: Define internal policies for certificate issuance, including when to use wildcards versus specific subdomains.

2. Centralize Certificate Management: Maintain a central certificate management system that tracks all certificates and their associated subdomains.

3. Monitor CT Logs Proactively: Don't wait for attackers to discover your subdomains—monitor CT logs yourself to stay ahead of threats.

4. Security Hardening: Assume all subdomains will be discovered and ensure every one is properly secured, regardless of whether it's "hidden."

5. Decommissioning Procedures: Implement proper procedures for decommissioning services, including DNS cleanup and firewall rule removal.

6. Training and Awareness: Educate development teams about the implications of CT logs and proper certificate management.

Integration with Security Programs

Subdomain discovery through CT logs should integrate with broader security programs:

Vulnerability Management: Ensure vulnerability scanners include all CT-discovered subdomains in their scope.

Penetration Testing: Provide penetration testers with CT log data to ensure comprehensive testing.

Incident Response: When incidents occur, use CT logs to verify whether attackers may have discovered additional entry points.

Threat Intelligence: Monitor CT logs for typosquatting and phishing domains targeting your organization.

Conclusion

Certificate Transparency logs represent a double-edged sword in cybersecurity. While they provide critical transparency and accountability for certificate issuance, they also create a comprehensive map of an organization's digital infrastructure that both defenders and attackers can leverage.

The key to managing this challenge is understanding that complete obscurity is impossible in the modern CT-enabled internet. Instead of trying to hide subdomains, organizations must:

  1. Accept that discovery is inevitable and plan accordingly
  2. Use strategic certificate management to minimize sensitive information disclosure
  3. Ensure all subdomains are secured regardless of perceived visibility
  4. Proactively monitor CT logs to stay ahead of threats
  5. Integrate CT log analysis into security programs

By embracing Certificate Transparency and understanding its implications, organizations can turn what might seem like a vulnerability into a powerful asset management and security monitoring tool.

Ready to discover what subdomains are publicly visible for your domains? Use our free Certificate Transparency Lookup tool to conduct comprehensive subdomain discovery and assess your public attack surface.

Frequently Asked Questions

What are Certificate Transparency logs?

Certificate Transparency (CT) logs are public, append-only, cryptographically verifiable records of every SSL/TLS certificate a participating Certificate Authority issues. They were defined in RFC 6962 (updated by RFC 9162 for CT version 2.0) and are implemented as Merkle trees, so entries can be added but never quietly altered or removed. Browsers like Chrome require certificates to be logged in CT before they are trusted, which means essentially every public certificate issued today ends up in these logs.

How do CT logs reveal subdomains?

Every certificate lists the hostnames it protects in its Common Name (CN) and Subject Alternative Name (SAN) fields. When a CA logs that certificate to CT, those hostnames become publicly searchable. Reading the SAN lists across all of a domain's certificates reveals subdomains that are never linked from the main site, indexed by search engines, or exposed in DNS zone transfers, including dev, staging, and admin hosts.

How do I find subdomains with crt.sh?

Query crt.sh with a wildcard for your target domain and request JSON output, then extract and deduplicate the hostnames. For example, curl 'https://crt.sh/?q=%25.example.com&output=json' | jq -r '.[].name_value' | sort -u returns every subdomain of example.com that has ever appeared in a logged certificate. You still need to validate which of those hosts currently resolve and respond, because CT logs include historical and expired certificates.

Can certificates be removed from CT logs?

No. CT logs are append-only by design, so a certificate that has been logged stays discoverable permanently, even after it expires or is revoked. That is why subdomain naming decisions matter before a certificate is issued: once payroll.example.com or a similar sensitive hostname is certified, that name is public forever and cannot be unpublished.

How can I stop attackers from finding my subdomains via CT logs?

You cannot fully hide public certificates, but you can limit disclosure. Use wildcard certificates (*.example.com) so individual hostnames are not listed, use an internal/private CA for services that only internal clients need to trust (private CA certificates do not appear in public CT logs), avoid descriptive names like hr-portal or customer-db on public hosts, and add CAA DNS records to restrict which CAs may issue for your domain. Most importantly, assume every subdomain will be discovered and secure each one accordingly.

What is the best tool for CT-based subdomain discovery?

For a quick manual lookup, crt.sh is the fastest. For scripted attack-surface work, subfinder aggregates crt.sh, Censys, Cert Spotter, and dozens of other passive sources into one fast enumeration, while amass goes deeper by combining CT logs with DNS brute-forcing and scanning. Censys and Cert Spotter (SSLMate) add enrichment and real-time monitoring. Most practitioners run subfinder or amass for breadth and drop to crt.sh for ad-hoc checks.

Is subdomain discovery through CT logs legal?

Reading public CT logs is passive reconnaissance against data that is intentionally public, and querying crt.sh or Censys for a domain is generally considered legal open-source intelligence. What crosses the line is what you do next: actively probing, scanning, or attempting to access the discovered hosts without authorization can violate computer-misuse laws. Only test systems you own or have explicit written permission to assess.

What is the difference between a SAN and a Common Name?

The Common Name (CN) is a single legacy field that historically held the primary hostname for a certificate. The Subject Alternative Name (SAN) is the modern field that lists every hostname the certificate is valid for, and it can contain many entries. Browsers now validate against the SAN, not the CN, so a single certificate can cover a bare domain, its www host, and many additional subdomains, all of which become visible in CT logs.

subdomain discoverycertificate transparencysecurity reconnaissanceattack surfacepenetration testing