PANDORASEARCH

Blog · Domain and IP recon

How to use dnstwist: find lookalike and phishing domains

dnstwist is an open-source tool that takes a domain, generates hundreds of similar variants (one letter missing, two letters swapped, a character that looks like another, a different ending) and checks which of them are registered. It is the most direct way to answer a question every security or fraud team asks sooner or later: has someone registered a domain that looks like ours to fool our customers? You run it from the command line, with something like dnstwist --registered example.com.

This guide follows the README of the official repository, the code of the latest release and the package page on Kali Linux, all checked on 22 November 2026. It covers how to install it, what each option does, which options connect to the suspect domain's servers, and what to do with what turns up. At the end we explain which part of that work Pandora, the tool we build, does in the browser.

The short answer

  • What it is. A domain name permutation engine for detecting homograph phishing, typosquatting and brand impersonation, in the words of its repository. It is licensed under Apache-2.0.
  • What it is for. Finding registered domains that look like yours, seeing where they point and whether they have mail set up, and comparing their website with yours.
  • How you use it. dnstwist <domain>, plus options to keep only what is registered, add data about each variant and save the result.
  • Where it runs. There are packages for Debian, Ubuntu and Kali, Fedora, Arch (AUR) and Homebrew; you can also install it with pip or run it with Docker. And it has a web version, dnstwist.it.
  • Its status. It is not archived. The latest release is 20250130, from 30 January 2025, and the most recent change on its main branch is from 15 April 2025.

Before you start: what each option touches

Not everything dnstwist does is equally quiet, and it is worth knowing before you point it at a domain you suspect belongs to an attacker:

  • Generating the names. With --format list, dnstwist only prints the variants. It makes no queries at all: the work happens on your machine.
  • Looking up DNS. This is the default: it asks your DNS server, or the ones you set with --nameservers, for each variant's records. The README warns that this means thousands of queries in a short time and that your DNS server has to cope with them.
  • Looking up WHOIS. With -w, it asks the registry's WHOIS server for each registered domain's creation date and registrar.
  • Connecting to the suspect domain. With --lsh it downloads the page of each variant that resolves; with --phash it opens it in a headless browser and takes a screenshot; with -b it requests its web server's header and reads its mail server's greeting; and with -m it opens an SMTP conversation with its mail server and asks whether it would accept a made-up recipient, without ever sending a message. In these cases, whoever runs that domain may see you in their logs, and on web requests the default User-Agent carries the name dnstwist.

How to install it

On Debian, Ubuntu or Kali. sudo apt install dnstwist. The Kali page lists version 20250130, the same as the latest release, and the package is part of the kali-linux-everything metapackage; the page does not say whether it comes installed by default.

On Fedora, Arch or macOS. sudo dnf install dnstwist on Fedora, yay -S dnstwist from the AUR on Arch, and brew install dnstwist with Homebrew, whose formula is at 20250130 for macOS and Linux.

With pip. There are two variants, and the difference matters:

pip install dnstwist[full]
pip install dnstwist

The first installs the optional dependencies: dnspython, geoip2, idna, ppdeep, py-tlsh and tld. The second, the minimal one, installs none of them, and dnstwist can then only resolve each variant's IPv4 and IPv6 addresses: without dnspython it does not query name servers or MX records, and it warns you with «WARNING: DNS features are limited due to lack of DNSPython library». Without MX records, -m and the mail part of -b do not work either.

With Docker. docker run -it elceef/dnstwist. If you want visual comparison, the README explains how to build the image with it: docker build -t dnstwist:phash --build-arg phash=1 .

From source. git clone https://github.com/elceef/dnstwist.git, cd dnstwist and pip install .

A note on --phash. Visual comparison also needs Pillow, Selenium and a Chrome browser with its driver, none of which come with dnstwist[full]. If they are missing, dnstwist says so with messages such as «missing Selenium Webdriver».

The commands you will use most

These are examples from the README, with example.com in place of your domain:

dnstwist --registered example.com
dnstwist --dictionary dictionaries/english.dict example.com
dnstwist --tld dictionaries/common_tlds.dict example.com
dnstwist --fuzzers "homoglyph,hyphenation" example.com
dnstwist --format csv example.com | column -t -s,
dnstwist --format json example.com | jq
dnstwist --lsh example.com
dnstwist --phash --screenshots /tmp/domain example.com

The first is the starting point: registered variants only. The second adds variants built from the words in a dictionary, and the third tries your name with other endings; both sample files are in the repository's dictionaries folder. The fourth limits the search to two algorithms. The fifth and sixth output CSV and JSON. The last two compare the variants' websites with yours: --lsh by how similar the HTML is, and --phash by how similar the screenshot is, saved in the folder you choose.

The options, in a table:

OptionWhat it doesContacts the variant
-r, --registeredRegistered variants only
-u, --unregisteredUnregistered ones only (cannot be combined with -r)
-f, --formatOutput as cli (default), csv, json or list
-o, --outputSaves the result to a file
-a, --allShows all DNS records, not just the first ones
--fuzzersUses only the algorithms you list, comma-separated
-d, --dictionaryAdds variants built from the words in a file
--tldSwaps the ending for the ones in a file
-w, --whoisCreation date and registrar, from the registry's WHOIS
-g, --geoipThe country of each IP, using a GeoLite2 database on your machine
--nameserversThe DNS or DoH servers to query
-t, --threadsParallel threads
--lshCompares the HTML of its website with yours (ssdeep or tlsh)Yes
-p, --phashCompares a screenshot of its website with yoursYes
--screenshotsSaves the --phash screenshots to a folderYes
-b, --bannersIts web server's header and its mail server's greetingYes
-m, --mxcheckWhether its mail server would accept misdirected mailYes

Two details from the code that the help does not mention. The default number of threads is your machine's core count plus four, capped at 32, so the figure shown in Kali's help may not be yours. And --geoip needs a GeoLite2 database on your machine: it looks for it in the GEOLITE2_MMDB environment variable or, failing that, next to the program.

The algorithms: which variants it tries

Each row of the result says which algorithm produced the variant. By default they all run: addition, insertion and replacement add, insert or substitute a character; omission drops a letter; repetition doubles one; transposition swaps two; vowel-swap changes a vowel; hyphenation adds a hyphen; subdomain puts a dot inside the name; plural makes it plural; bitsquatting flips one bit of a character; homoglyph uses characters that look alike, and cyrillic, Cyrillic letters that look identical to Latin ones. various tries structural combinations, such as moving the ending into the name. dictionary and tld-swap only produce anything if you give them a file with -d or --tld.

The README is honest about the limit: it only checks names similar to the original, because full coverage would take millions of lookups. A domain that adds a word to your brand, such as login, support or the name of your city, will not show up unless that word is in your dictionary. It is worth keeping your own list of the words someone impersonating you would use.

How to read the result

In the default output, each line has the algorithm, the variant and what was found: the IPs, the name servers (NS:), the mail servers (MX:) and, if you asked for them, the registrar, the creation date and the website similarity. In CSV and JSON the fields are fuzzer, domain, dns_a, dns_aaaa, dns_ns, dns_mx, geoip, whois_created, whois_registrar, ssdeep, tlsh, phash, banner_http, banner_smtp and mx_spy.

Three things that keep you from reading too much into it:

  • «Registered» means DNS answered something. For dnstwist, a variant is registered if it has any DNS record, or if the server returned an error instead of saying it does not exist. It does not mean it has a website, or that it belongs to an attacker.
  • Many lookalike domains are legitimate. It may be a company with a similar name, a domain parked by a reseller, or a defensive registration by your own organisation. Before anything else, check that it is not yours.
  • A SPYING-MX does not prove anyone is reading your mail. That -m flag means the variant's mail server accepted a made-up recipient, which any server set up to accept all mail for its domain will also do. It is a signal to look closer.

From the list to a decision

A list of registered variants is where the work starts. For each one that worries you, a practical order is:

  1. Its creation date and registrar, with -w or an RDAP lookup. A lookalike registered a few days ago weighs more than one that has existed for ten years.
  2. Its DNS. If it has MX records, it can receive mail, including the replies of anyone who falls for a scam.
  3. Its certificates. Certificate Transparency logs show whether someone requested a certificate for that variant, and when: in phishing it tends to match the day a campaign is set up.
  4. Its website, with --lsh or --phash, or by looking at it from an isolated environment. A close resemblance to your login page is the clearest signal.
  5. Its reputation. Whether it already appears in a phishing feed or a threat report.

With several signals pointing the same way, you have grounds to act: report it to the abuse contacts of the registrar and the hosting provider, block the domain in your mail and proxy, and warn your customers if needed. The full method, step by step, is in the guide to domain and IP reconnaissance, and if what you want to know is who is behind the variant, see how to find who owns a domain.

Is there a dnstwist online version?

Yes. The website listed in the repository, dnstwist.it, is a browser version: it presents itself as a «phishing domain scanner», has a button to run a scan and links to the project's code. The page does not say what limits it has or which command-line options it includes.

It is not to be confused with dnstwister, another service with a similar name. Its old address, dnstwister.report, now redirects to dnstwister.com, which offers a free check with no email or card required and, as a paid option, a deeper scan and ongoing monitoring with alerts. Its page does not say that it uses dnstwist.

If you want another command-line tool, Kali also packages URLCrazy, which its page describes as a domain typo generator. And if you want the context of each variant (its DNS, its registration, its certificates and its reputation) without moving the list from one tool to the next, there is another way.

The variants on the same graph: Pandora

Pandora is the tool we build: an OSINT link analysis search engine that runs in the browser. It is not dnstwist, but it reproduces its method, as we state in the site credits alongside its Apache-2.0 licence.

What it does with a domain. When you enter a domain, Pandora runs the automatic sweep: DNS, RDAP, Certificate Transparency, passive DNS, phishing feeds, AlienVault OTX, Shodan InternetDB, RIPEstat and its local IP databases, which flag Tor exit nodes, VPNs, data centres and reputation lists. For the starting domain, it also looks for its registered variants, in the style of dnstwist.

A domain's infrastructure in Pandora: subdomains from certificates and passive DNS, its IP, its autonomous system and the reputation flags. Example data. Try it with your own data

How you read it. Everything appears on a graph that grows live, with the source of every finding. The Dossier gathers the flagged domains and IPs, each with the source that flagged it, and the timeline places domain registrations alongside the other dates in the case. Collection is passive: Pandora reads what other sources have already observed and scans nothing. To compare each variant's website with yours, take screenshots or query its mail server, dnstwist is the tool.

What it costs. The plans are on the pricing page. A free account gets one trial search, with the findings masked: you see what kind of findings turned up and how many, but not which ones. If you want to compare command-line recon tools, we put them side by side in SpiderFoot vs theHarvester vs recon-ng.

dnstwist is legal, and generating variants of your own domain and looking up their DNS is ordinary internet activity. The options that connect to the suspect domains' servers are a different matter: use them within your security role or an engagement, no further than you need to reach a decision, and never enter real data into a phishing page to see what happens.

Also, the registrant of a lookalike domain may be a private individual, and then their registration data is personal data: you need a legitimate purpose and a legal basis under the GDPR or its equivalent, and you keep no more than the case needs. And a domain that looks like yours does not prove bad faith: before you accuse anyone, corroborate with independent sources. The article on OSINT and the GDPR covers this in detail.

This article is not legal advice.

Frequently asked questions

What is dnstwist?

An open-source tool, licensed under Apache-2.0, that generates permutations of a domain name (swapped, missing or doubled letters, lookalike characters, a different top-level domain) and checks which of them are registered. It is used to detect typosquatting, phishing and brand impersonation.

How do you use dnstwist?

Pass the domain as the argument: dnstwist --registered example.com shows only the registered variants. With --format csv or json you get the result in those formats and with -o you save it to a file; with -w you add each variant's creation date and registrar, and with --lsh or --phash you compare their websites with yours.

Is there a dnstwist online version?

Yes: the repository's website, dnstwist.it, is a browser version with a button to scan a domain. dnstwister is a separate service: its old address, dnstwister.report, now redirects to dnstwister.com, which offers a free check and paid monitoring with alerts.

Is dnstwist passive?

It depends on the options. With --format list it only generates the names, without querying anything. By default it runs DNS lookups for each variant. With --lsh, --phash, --banners or --mxcheck it connects to the web or mail servers of the suspect domains itself.

Why doesn't dnstwist find every lookalike domain?

Because it only tests the variants its algorithms generate: covering everything would take millions of lookups. A domain that adds a word to your brand, such as login or support, only shows up if you give it that word in a dictionary with -d.

Is it legal to use dnstwist?

Generating variants and looking up their DNS is ordinary internet activity. The options that connect to the suspect domains' servers are best used within your security role. And if a domain's registrant is a private individual, their data is personal data: the GDPR requires a legitimate purpose and a legal basis.

Tags:toolsdnstwistphishingtyposquattingdomains