๐ Domain Availability Checker
A powerful Python tool to check domain name availability with Namecheap API integration, DNS verification, and WHOIS lookup to find domains that are actually purchasable on registrars like Namecheap.
๐ Why This Tool?
Unlike simple WHOIS checkers, this tool uses multi-layer verification to eliminate false positives and find domains you can actually register:
- โ
Filters out reserved/restricted domains
- โ
Identifies premium domains separately
- โ
Verifies availability via Namecheap API
- โ
Fast multi-threaded checking
- โ
Comprehensive CSV reports
Perfect for: Domain investors, developers, marketers, and anyone looking for available domain names.
๐ Table of Contents
๐ฏ Key Features
Multi-Layer Verification System (Works Great With OR Without API!)
Without Namecheap API (High Accuracy):
- Advanced WHOIS Check - Multiple indicators (registrar, creation date, expiration, nameservers)
- Comprehensive DNS Verification - Checks A, AAAA, MX, NS, CNAME, SOA records
- HTTP/HTTPS Response Check - Detects active websites vs truly available domains
- Confidence Scoring - HIGH, MEDIUM, LOW confidence levels for each result
- Smart Detection - Filters reserved/premium/parked domains
With Namecheap API (Very High Accuracy):
- All of the above PLUS
- Direct verification via Namecheap's official API
- Premium domain detection with pricing info
- Registrar-level accuracy
๐ก Note: The tool provides excellent accuracy even WITHOUT the Namecheap API! The API is optional for those who want the highest possible accuracy.
Why This Matters
Some domains show as "not found" in WHOIS but are actually:
- Reserved by registries (can't be purchased)
- Premium domains (require special pricing)
- Restricted domains (not available for regular registration)
This enhanced checker uses multiple verification methods to show only truly purchasable domains.
Status Types
- AVAILABLE โ - Domain is confirmed available for purchase (HIGH/VERY HIGH confidence)
- POSSIBLY AVAILABLE โ ๏ธ - Domain might be available but needs manual verification (MEDIUM confidence)
- PREMIUM ๐ - Domain is available but requires premium pricing (API only)
- TAKEN โ - Domain is registered
- RESTRICTED/PREMIUM โ ๏ธ - Domain appears unregistered but has DNS/HTTP activity (likely restricted)
Confidence Levels
- VERY HIGH - API confirmed or multiple strong indicators
- HIGH - Strong WHOIS + DNS indicators
- MEDIUM - Some conflicting signals, verify manually
- LOW - Uncertain status, treated as TAKEN for safety
๐ฆ Installation
Prerequisites
- Python 3.6 or higher
- pip (Python package manager)
- Namecheap account (optional, for API access)
Step 1: Clone the Repository
git clone https://github.com/sithulaka/DomainChecker.git
cd DomainChecker
Step 2: Install Dependencies
Step 2: Install Dependencies
pip install -r requirements.txt
Packages installed:
python-whois - WHOIS lookups
dnspython - DNS verification
requests - API calls
python-dotenv - Environment variable management
Step 3: Test Your Installation (Optional)
# Quick test to ensure everything is installed
python -c "import whois, dns.resolver, requests; print('โ
All packages installed!')"
๐ Quick Start
Without API (Basic Mode)
Add domain names to input/domain_name/domain_names.txt:
myawesomesite
cooldomain
techstartup
Add TLDs to input/top_level_domain/tlds.txt:
.com
.net
.org
Run the checker:
python main.py
Check results in output/available_domains.csv
With Namecheap API (Recommended)
Follow the Configuration section below to set up API access for the most accurate results.
โ๏ธ Configuration
2. Configure Namecheap API (Required for Best Results)
Edit the .env file with your Namecheap credentials:
NAMECHEAP_API_KEY=d01aec89241e4b609041f2376f0798a9
NAMECHEAP_API_USER=your_namecheap_username
NAMECHEAP_USERNAME=your_namecheap_username
NAMECHEAP_CLIENT_IP=your_public_ip_address
How to get your Namecheap API credentials:
- Log in to your Namecheap account
- Go to Profile > Tools > Business & Dev Tools > API Access
- Enable API access (may require min balance of $50)
- Get your API key and username
- Whitelist your public IP address (find it at https://whatismyipaddress.com/)
- Update the
.env file with your information
Important Notes:
- Replace
your_namecheap_username with your actual Namecheap username
- Replace
your_public_ip_address with your actual public IP
- You must whitelist your IP in Namecheap's API settings
- Production API endpoint is used (not sandbox)
Note: The .env file is git-ignored for security. Never commit API credentials to version control!
Step-by-Step API Setup
For detailed instructions on setting up Namecheap API, see: NAMECHEAP_SETUP.md
Test Your API Configuration
Before running the domain checker, test your API setup:
python test_api.py
This will verify:
- โ
All credentials are present in
.env
- โ
API key is valid
- โ
IP address is whitelisted
- โ
API access is enabled
Expected output:
โ
SUCCESS! API credentials are working correctly!
If you see errors, follow the solutions shown in the output or check NAMECHEAP_SETUP.md.
๐ป Usage
- Add your domain names to text files in
input/domain_name/
- Add TLDs to check in text files in
input/top_level_domain/
- Run the checker:
python main.py
Advanced Usage
Multiple input files: You can create multiple .txt files in the input folders. The program will automatically load and combine all of them.
Example structure:
input/
domain_name/
main_domains.txt
backup_domains.txt
premium_ideas.txt
top_level_domain/
common_tlds.txt
country_tlds.txt
Customize worker threads: Edit NUM_WORKERS in main.py to control parallel processing (default: 5)
๐ Output Files
The program creates 3 CSV files in the output/ folder:
1. domain_results.csv
Summary table view with domain names as rows and TLDs as columns
2. domain_results_detailed.csv
Detailed information including:
- Domain Name
- TLD
- Full Domain
- Status
- Confidence Level (VERY HIGH, HIGH, MEDIUM, LOW)
- WHOIS Available (Yes/No)
- DNS Active (Yes/No)
- DNS Records (A, AAAA, MX, NS, CNAME, SOA)
- HTTP Active (Yes/No - website responding)
- Namecheap API Status (if configured)
- Recommended Action (safe to purchase, verify first, etc.)
3. available_domains.csv โญ RECOMMENDED
Clean list of available and possibly available domains sorted by confidence:
- Full Domain
- Domain Name
- TLD
- Confidence Level
- Verification Method (shows which methods were used)
Example output:
Full Domain,Domain Name,TLD
myawesomesite.com,myawesomesite,.com
techstartup.net,techstartup,.net
๐ง How It Works
Enhanced Checking Process
For each domain, the script:
- WHOIS Lookup - Queries if the domain is registered
- DNS Query - Checks for active DNS records (A, AAAA, MX, NS)
- Namecheap API Call - Verifies actual availability on Namecheap
- Smart Analysis - Determines final status:
- โโโ AVAILABLE: Confirmed by Namecheap API
- ๐ PREMIUM: Available but premium pricing
- โ TAKEN: Confirmed taken
- โ RESTRICTED: Anomaly detected (DNS but not registered)
Accuracy Levels
1. Without Namecheap API (HIGH Accuracy - Recommended for Most Users) โโ
- Advanced WHOIS with multiple indicators
- Comprehensive DNS checking (6 record types)
- HTTP/HTTPS website detection
- Confidence scoring system
- Filters 95%+ of false positives
2. With Namecheap API (VERY HIGH Accuracy - For Professional Use) โโโ
- All features from #1
- Direct Namecheap verification
- Premium domain detection
- Filters 99%+ of false positives
Both modes are highly accurate! The API adds an extra layer but isn't required for excellent results.
Folder Structure
DomainChecker/
โโโ main.py # Main application script
โโโ requirements.txt # Python dependencies
โโโ .env # API credentials (git-ignored)
โโโ .gitignore # Git ignore rules
โโโ README.md # This file
โโโ LICENSE # MIT License
โโโ input/ # Input configuration
โ โโโ domain_name/ # Domain name files
โ โ โโโ domain_names.txt # Your domain ideas
โ โ โโโ *.txt # Additional files
โ โโโ top_level_domain/ # TLD files
โ โโโ tlds.txt # TLDs to check
โ โโโ *.txt # Additional TLD files
โโโ output/ # Generated results
โโโ domain_results.csv # Summary table
โโโ domain_results_detailed.csv # Detailed info
โโโ available_domains.csv # Available domains only
๐๏ธ Configuration Options
Edit these settings in main.py:
- Worker Threads:
NUM_WORKERS = 5 (reduce if you hit rate limits)
- Request Delays:
time.sleep() values (increase for fewer errors)
Environment Variables
All sensitive configuration is stored in .env:
| Variable |
Description |
Required |
NAMECHEAP_API_KEY |
Your API key from Namecheap |
Optional* |
NAMECHEAP_API_USER |
Your Namecheap username |
Optional* |
NAMECHEAP_USERNAME |
Your Namecheap username (same as API_USER) |
Optional* |
NAMECHEAP_CLIENT_IP |
Your whitelisted public IP |
Optional* |
*Required for API verification, but tool works without it using WHOIS+DNS only.
๐ก Tips for Best Results
- โ
Set up Namecheap API for highest accuracy
- โฑ The checker waits between requests to avoid rate limiting
- ๐ DNS verification helps filter out reserved/premium domains
- ๐ Check the
available_domains.csv file for the cleanest list
- โ Domains marked as "AVAILABLE" by API are confirmed purchasable
- ๐ Premium domains are separated from regular available domains
- ๐ If you get many errors, reduce
NUM_WORKERS in main.py
๐ Troubleshooting
API Not Working?
Check these:
- Is your API key correct in
.env?
- Is your username exactly as shown in Namecheap?
- Is your IP whitelisted in Namecheap API settings?
- Do you have sufficient balance ($50 min for API access)?
- Are you using production endpoint (not sandbox)?
Error messages:
ERROR_NO_CREDENTIALS - .env file missing or incomplete
ERROR_API - Wrong credentials or IP not whitelisted
API_NOT_CONFIGURED - API key not found, using fallback method
Too Many Errors?
- Reduce
NUM_WORKERS to 2-3
- Increase delays in the code
- Check your internet connection
All Domains Show as RESTRICTED/PREMIUM?
- This is working correctly! Those domains have DNS but aren't registered
- Check
available_domains.csv for truly available ones
- If using API, check the Namecheap API Status column
Want Faster Checks?
- Increase
NUM_WORKERS (but may cause rate limiting)
- API calls add 0.5s per request (necessary for rate limiting)
Common Issues
| Issue |
Solution |
| Import errors |
Run pip install -r requirements.txt |
| No domains loaded |
Check .txt files are in correct folders |
| API not working |
Verify credentials and IP whitelist |