A lightweight Bash script that checks domain name availability using whois lookups. Supports single lookups, bulk checking from a file, and ships with a small built-in example list for quick testing.
- Single domain lookup — instant check for one domain
- File-based bulk checking — feed it a
.txtfile with one domain per line - Built-in examples — run with no arguments to verify everything works
- Colour-coded output — green for available, red for taken, yellow for uncertain
- Rate-limit friendly — 1.5s delay between lookups to avoid getting blocked
- Comment support — organise your domain files with
#comments and blank lines
The script requires whois to be installed on your system.
# Debian / Ubuntu
sudo apt install whois
# macOS (Homebrew)
brew install whois
# Arch Linux
sudo pacman -S whoisgit clone https://github.com/your-username/domain-checker.git
cd domain-checker
chmod +x check_domains.sh./check_domains.sh example.com🕊️ Domain Availability Checker — Single Lookup
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
❌ TAKEN example.com
./check_domains.sh -f domains.txt🕊️ Domain Availability Checker — File: domains.txt (8 domains)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ AVAILABLE my-awesome-startup.com
✅ AVAILABLE cool-project-name.com
✅ AVAILABLE definitely-available-12345.com
...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Summary:
Available: 5
Taken: 2
Unknown: 1
🎯 Available domains:
→ my-awesome-startup.com
→ cool-project-name.com
→ definitely-available-12345.com
...
./check_domains.shThis runs a small set of hardcoded test domains to verify the script is working correctly.
Create a plain text file with one domain per line. Comments (#) and blank lines are supported for organisation.
# Primary choices
mybrand.com
mybrand.io
# Alternatives
mybrand-app.com
getmybrand.com
# Known taken (for sanity checking)
google.com
See domains.example.txt for a ready-to-use template.
The script queries whois for each domain and pattern-matches the response to determine availability:
| Result | Meaning |
|---|---|
| ✅ AVAILABLE | whois returned "not found" / "no match" indicators |
| ❌ TAKEN | whois returned registrar / nameserver / creation date info |
| ❓ UNKNOWN | Response didn't match either pattern — check manually |
Note: whois responses vary by registrar and TLD. Some TLDs (especially newer ones) may return non-standard responses that land in the UNKNOWN bucket. When in doubt, verify manually with your registrar of choice.
- Rate limiting — Some whois servers will throttle or block you if you hammer them. The built-in 1.5s delay helps, but very large lists may still hit limits.
- Accuracy — whois pattern matching is best-effort. Premium/reserved domains may show as available. Always confirm with a registrar before purchasing.
- TLD coverage — Works well with
.com,.io,.co,.net,.organd most common TLDs. Newer or country-specific TLDs may need manual verification.
MIT