# Install subfinder on Windows, macOS and Linux

Fast passive subdomain enumeration from dozens of public sources.

subfinder finds the subdomains of a domain by asking dozens of public sources, such as certificate transparency logs and DNS datasets. It is passive, fast and useful without any API keys, which makes it the usual first step in mapping a domain.

## How to install subfinder

```
ot install subfinder
```

ot downloads subfinder 2.17.0 as a prebuilt binary from [github.com/projectdiscovery/subfinder](https://github.com/projectdiscovery/subfinder/releases) and verifies its SHA-256 checksum before installing it. Nothing has to be compiled. A Docker image is available as well: `ot install subfinder --method docker`.

If you do not have ot yet:

macOS and Linux:

```
curl -fsSL https://otinstaller.com/install.sh | sh
```

Windows (PowerShell):

```
irm https://otinstaller.com/install.ps1 | iex
```

Current version: 0.3.0. Both scripts verify the download against its [SHA-256 checksum](https://otinstaller.com/releases/v0.3.0/checksums.txt) before installing.

## How to use subfinder

Arguments after the tool's name go straight to subfinder.

Print the subdomains, one per line.

```
ot run subfinder -d example.com -silent
```

Use every source, which is slower, and save the result.

```
ot run subfinder -d example.com -all -o subdomains.txt
```

Print JSON, including the source of each name.

```
ot run subfinder -d example.com -oJ
```

`ot run subfinder --help` lists every option.

An AI agent can run subfinder too: `ot mcp` serves it over the Model Context Protocol. See [OSINT with AI agents](https://otinstaller.com/mcp/).

## Run subfinder with other tools

`ot scan domain example.com` runs subfinder together with theharvester and merges what they find into one table, listing each finding once.

## API keys for subfinder

subfinder reads these environment variables. Store one with `ot keys set NAME` and ot passes it to subfinder on every run.

| Variable | Purpose |
|---|---|
| `PDCP_API_KEY` | ProjectDiscovery Cloud Platform key (optional) |

## subfinder licence, platforms and versions

- Project: https://github.com/projectdiscovery/subfinder
- Licence: MIT
- Runs on: Windows, macOS and Linux
- Takes: domain
- Categories: domain, subdomain, recon
- Sends traffic to the target: no
- Release binary: version 2.17.0 from github.com/projectdiscovery/subfinder, verified by SHA-256
- Docker image: projectdiscovery/subfinder, with --method docker

## Questions about subfinder

### How do I install subfinder on Windows?

Open PowerShell and install ot with `irm https://otinstaller.com/install.ps1 | iex`. Then run `ot install subfinder`. ot fetches a pinned version of subfinder and keeps it under `~/.ot`, apart from the rest of your system.

### Is subfinder free?

Yes. subfinder is open source, released under the MIT licence. ot, which installs it, is free under the Apache 2.0 licence.

### Do I need Go or a compiler to install subfinder?

No. ot downloads the prebuilt subfinder binary for your platform and checks its SHA-256 checksum. A mismatch installs nothing.

### How do I update or remove subfinder?

`ot update subfinder` moves it to the version pinned in ot's registry, and `ot update subfinder --latest` to the newest upstream release. `ot remove subfinder` uninstalls it.

## Tools related to subfinder

- [amass](https://otinstaller.com/tools/amass/): In-depth attack surface mapping and subdomain discovery from many data sources.
- [bbot](https://otinstaller.com/tools/bbot/): Recursive OSINT automation: subdomains, emails, web and cloud findings in one run.
- [alterx](https://otinstaller.com/tools/alterx/): Generate likely subdomain names from known ones using patterns.
- [chaos](https://otinstaller.com/tools/chaos/): Query the ProjectDiscovery Chaos dataset of known subdomains.
- [dnsx](https://otinstaller.com/tools/dnsx/): Fast DNS toolkit for resolving and probing large lists of hostnames.
- [fierce](https://otinstaller.com/tools/fierce/): DNS reconnaissance for locating hosts and non-contiguous IP space of a domain.

More: [Subdomains and DNS](https://otinstaller.com/osint-tools/subdomains/).
