·7 min read
DomainHunter: checking domains via RDAP, WHOIS and DNS
I wanted a name for a project and I was tired of the same ritual: type a candidate into a registrar, see a price of a couple of dollars, get excited, and only later notice the renewal price. So I wrote DomainHunter, a Python tool that checks availability against the registries themselves and prices every name for more than one year.
- Role
- Creator and sole developer
- Period
- Sep 2026
- Status
- Released: v1.0.0 (23 Sep 2026), Windows exe plus source
- Stack
- Python, requests, rich, PyInstaller
Run `python domainhunter.py check vantle.dev mer.ge google.com` and see which source answered for each name.
View on GitHubThe challenge
"Is this domain free?" sounds like one question, but it is three. First, which server is allowed to answer? Every extension has its own registry, and they disagree about protocols. Some publish RDAP, a structured JSON API. Some only answer WHOIS on port 43, in free text that every registry words differently. A few do neither.
Second, what does a wrong answer cost? If a tool says "available" when it actually timed out, you plan a brand around a name you cannot buy. So the rule I set for myself was simple: never guess. If nobody answered, the honest result is unknown.
Third, what will it really cost? Registrars advertise the first year. The renewal is the number that bites. I wanted one column that showed the real multi-year total.
My responsibility
I am the only developer. I chose the sources, wrote the three availability checkers, the pricing client with its cache, the brand ranking, the CLI and interactive menu, the icon generator, and the PyInstaller build script that produces the single-file Windows exe. I also wrote the README, including the caveats section about what can break.
How I approached it
The layout is deliberately flat, one file per concern:
Three sources, tried in order
Checker.check in availability.py walks the sources from strongest evidence to weakest and stops at the first one that is not unknown:
best = self.rdap(domain)
if best.status != UNKNOWN:
return best
res = self.whois(domain)
if res.status != UNKNOWN:
return res
if res.detail:
best = res
res = self.dns(domain)
if res.status != UNKNOWN:
return res
return best if best.detail else resEach Result carries a source field, so the output table says which one spoke. That is the whole point: when you see dns next to a name, you know the evidence is weaker than rdap.
The bootstrap 404 that is not an answer
The first trap is in the RDAP step. rdap.org redirects each query to the right registry. But it also returns a plain 404 for extensions that publish no RDAP server at all, such as .io and .gg. A naive reading treats every 404 as "no such object, so it is free". The code guards against it:
redirected = "rdap.org" not in r.url.split("/")[2]
...
if r.status_code == 404 and redirected:
return Result(domain, FREE, "rdap", "no such object")
if r.status_code == 404:
return Result(domain, UNKNOWN, "rdap", "tld has no rdap server")A real "free" answer always comes from the registry's own host, so I require that the redirect happened. Otherwise the check falls through to WHOIS. The comment in the source explains this in the same words, and it is the single most important line in the file.
A regex that swallowed the next field
WHOIS is the messy part. The tool first asks whois.iana.org which host serves a given extension, then queries that host directly. IANA replies with a whois: line, and for some extensions, .ga among them, that line is blank. A pattern built on \s* would run across the newline and capture the next field name as if it were the host, so the code only allows horizontal whitespace:
m = re.search(r"^whois:[^\S\r\n]*(\S+)[^\S\r\n]*$", text, re.M | re.I)
if m and "." in m.group(1):
host = m.group(1)The extra "." in m.group(1) check is a second guard: a hostname without a dot is rejected. The comment above that line in the source records exactly this trap. WHOIS is also throttled with a per-host lock and a 1.2 second minimum gap, so ten worker threads do not hammer one registry. Registries that refuse public queries, .ch for example, are detected by marker phrases and passed over instead of being misread as "taken".
A typo that looks available
The DNS fallback has its own trap. A name under an extension that does not exist returns NXDOMAIN, which would read as "free". So before trusting NXDOMAIN, root_zone() downloads the IANA list of real extensions and the check refuses names whose extension is not in it, returning unknown with a .<tld> is not a real tld detail.
A $2.57 domain that costs $90
Pricing comes from Porkbun's public endpoint, which needs no key and covers about 900 extensions with registration, renewal and transfer prices. The method that changed how I choose names is tiny:
def total_cost(self, years: int = 3) -> float | None:
renew = self.renewal if self.renewal else self.registration
return self.registration + renew * max(0, years - 1)The docstring uses the README's own example: a .store at $2.57 renewing at $43.77. Over the default three years that is 2.57 + 2 x 43.77, about $90.11. A .lol at $1.54 renewing at $26.26 comes to about $54.06. Same formula, my arithmetic.
.store
.lol
Ranking is a second decision. affordable() sorts by brand_rank first and total cost second, so a cheap junk extension can never outrank a good one. The README puts it this way: a $1 .click is a worse home than an $8.75 .dev. And --renew-budget caps the renewal separately from the first-year budget.
Domain hacks
The extension can finish the word. merge becomes mer.ge, trade becomes tra.de. brands.py holds a list of explicit hacks, and hacks prints them without touching the network.
Project journey
I only have one commit to point at, so this timeline is honest about that: the repository was published as a finished first release.
Sep 2026
Initial commit 8c24558
CLI, three availability sources, Porkbun pricing, brand ranking
Sep 2026
Same commit: honest availability
RDAP redirect guard, WHOIS throttle, DNS root-zone check
Sep 2026
Same commit: true cost
register-then-renew total, renewal budget, first-year deals
Sep 2026
Release v1.0.0
published 23 Sep 2026 with a Windows exe
Beyond the launch
The README is candid about the fragile part. The optional tld-list.com source sits behind a Cloudflare challenge, so instead of trying to defeat it the tool reuses cookies your own browser already holds, and never writes them to disk. If the markup changes, that half may return nothing while availability, Porkbun pricing and the deals table keep working. I deliberately kept those independent. A doctor command self-checks the bundled modules, RDAP, WHOIS and DNS.
The outcome
What I can verify from the repository: a tagged and published v1.0.0 release; seven commands (hunt, check, hacks, promos, cheap, price, doctor); --json and --csv export on every table; a build script that produces a single-file exe the README sizes at about 29 MB; and a six-hour price cache in the temp folder.
If you are naming something this week, try `hunt --sort total --years 5` before you pay for a teaser price.
Download the latest releaseEvidence
- Repository: https://github.com/ddatunashvili/domain_hunter (commit
8c24558, releasev1.0.0) - Files relied on:
availability.py,pricing.py,brands.py,domainhunter.py,README.md - Not verified: I did not run the tool against live registries for this write-up, and prices change daily, so the dollar figures are the README's examples, not current quotes.
#Python#RDAP#WHOIS#CLI
Keep reading
Have a project in mind?