Domain Checker
Check domain availability using whois + DNS cross-verification. Single source of truth for all domain availability queries.
Quick Start
Run the Python script (no system dependencies — no whois/dig CLI needed):
CODEBLOCK0
Or pipe a list:
CODEBLOCK1
Legacy bash script (requires whois + dig CLI):
CODEBLOCK2
Output Format
Each domain gets one of three verdicts:
| Symbol | Meaning | Confidence |
|---|
| ✅ AVAILABLE | whois says "not found" AND no DNS NS records | High |
| ❌ TAKEN |
whois shows Creation Date OR DNS records exist | High |
| ⚠️ LIKELY TAKEN | Conflicting signals (whois unclear but DNS exists) | Medium |
| ❓ UNKNOWN | whois returned no data — verify manually | Low |
How It Works
Three independent signals are cross-verified:
- 1. whois Creation Date — Most authoritative. If present, domain is taken.
- DNS NS records — Registered domains almost always have nameservers.
- DNS A records — Fallback signal for parked/active domains.
A domain is only marked AVAILABLE when whois explicitly says "not found" AND no DNS records exist. This eliminates false positives from unreliable whois web interfaces.
Important Notes
- - Rate limiting: The script waits 1 second between queries to avoid whois server throttling. For large batches (>50), consider splitting into multiple runs.
- whois web interfaces are unreliable: Sites like whois.com often return stale/incorrect data. This script uses the
whois CLI directly. - .ai TLD quirk: The .ai whois server sometimes returns sparse data. The script handles this by also checking DNS.
- Premium/aftermarket domains: A domain may be "available" in whois but listed at a premium price on registrars. The script cannot detect this — check the registrar for actual purchase price.
- Python script: No system dependencies — uses stdlib
socket for whois (port 43) and DNS resolution. - Bash script (legacy): Requires
whois and dig CLI tools (pre-installed on most Linux/macOS systems).
Batch Domain Brainstorming
When helping users brainstorm project names with domain checks, use this workflow:
- 1. Generate 15-30 candidate names based on user criteria
- Run all candidates through the script in one batch
- Present only the AVAILABLE results with analysis
- Iterate on available candidates if needed
Example:
CODEBLOCK3
域名检查器
使用 whois + DNS 交叉验证检查域名可用性。所有域名可用性查询的单一权威来源。
快速开始
运行 Python 脚本(无需系统依赖 — 无需 whois/dig 命令行工具):
bash
python3 scripts/check_domains.py example.com myproject.io brand.ai
或者通过管道输入列表:
bash
echo foo.com bar.ai baz.io | python3 scripts/check_domains.py
旧版 bash 脚本(需要 whois + dig 命令行工具):
bash
bash scripts/check_domains.sh example.com myproject.io brand.ai
输出格式
每个域名会得到以下三种判定之一:
| 符号 | 含义 | 可信度 |
|---|
| ✅ 可用 | whois 显示未找到且无 DNS NS 记录 | 高 |
| ❌ 已被注册 |
whois 显示创建日期或存在 DNS 记录 | 高 |
| ⚠️ 可能已被注册 | 信号冲突(whois 不明确但 DNS 存在) | 中 |
| ❓ 未知 | whois 未返回数据 — 需手动验证 | 低 |
工作原理
三个独立的信号进行交叉验证:
- 1. whois 创建日期 — 最权威。如果存在,域名已被注册。
- DNS NS 记录 — 已注册的域名几乎都有名称服务器。
- DNS A 记录 — 停放/活跃域名的备用信号。
只有当 whois 明确显示未找到且不存在 DNS 记录时,域名才会被标记为可用。这消除了不可靠的 whois 网页界面带来的误报。
重要说明
- - 速率限制:脚本在查询之间等待 1 秒,以避免 whois 服务器限流。对于大批量查询(>50),建议分多次运行。
- whois 网页界面不可靠:像 whois.com 这样的网站经常返回过时/错误的数据。本脚本直接使用 whois 命令行工具。
- .ai 顶级域的特殊情况:.ai 的 whois 服务器有时返回稀疏数据。脚本通过同时检查 DNS 来处理这种情况。
- 溢价/售后市场域名:域名可能在 whois 中显示可用,但在注册商处以溢价价格列出。脚本无法检测到这一点 — 请向注册商查询实际购买价格。
- Python 脚本:无系统依赖 — 使用标准库 socket 进行 whois(端口 43)和 DNS 解析。
- Bash 脚本(旧版):需要 whois 和 dig 命令行工具(大多数 Linux/macOS 系统预装)。
批量域名头脑风暴
在帮助用户通过域名检查来构思项目名称时,请使用此工作流程:
- 1. 根据用户标准生成 15-30 个候选名称
- 一次性将所有候选名称通过脚本运行
- 仅展示可用结果并附上分析
- 如有需要,在可用候选中迭代
示例:
bash
python3 scripts/check_domains.py myapp.com myapp.ai myapp.io coolname.com coolname.ai