zwdomain
v1.0.0
Published
Domain intelligence utility for .co.zw domains - check availability, DNS records, DKIM analysis, and hosting detection
Downloads
105
Maintainers
Readme
zwdomain
Domain intelligence utility for
.co.zwdomains — check availability, DNS records, and detect hosting/email providers.
Features
- ✅ Domain Availability — Check if a
.co.zwdomain is available via ZISPA - 🔍 DNS Intelligence — Fetch A, AAAA, MX, NS, TXT, CNAME records
- 🏢 Hosting Detection — Identify hosting providers from IP addresses
- 📧 Email Detection — Detect email providers from MX records
- 🔐 DKIM Analysis — Find DKIM selectors and display record values
- 🛡️ Security Checks — DNSSEC detection
- 📊 Smart TXT Labels — Auto-identifies SPF, DMARC, verification records
- 🖥️ CLI & Library — Use from command line or as an npm package
Installation
# Install globally for CLI usage
npm install -g zwdomain
# Or install as a project dependency
npm install zwdomainCLI Usage
Check Domain Availability
# Basic availability check
zwdomain check example.co.zw
# With provider detection
zwdomain check example.co.zw --provider
# JSON output for scripting
zwdomain check example.co.zw --json
# Verbose mode
zwdomain check example.co.zw --provider --verboseSample Output
══════════════════════════════════════════════════
DOMAIN CHECK: zol.co.zw
══════════════════════════════════════════════════
Status: ❌ TAKEN
──────────────────────────────────────────────────
NAMESERVERS
──────────────────────────────────────────────────
│ ns1.liquidtelecom.net
│ ns2.liquidtelecom.net
──────────────────────────────────────────────────
A RECORDS (IPv4)
──────────────────────────────────────────────────
│ 197.211.236.175
──────────────────────────────────────────────────
TXT RECORDS
──────────────────────────────────────────────────
│ [1] SPF
│ v=spf1 ip4:197.211.212.0/24 include:...
│
│ [2] TXT
│ 5n0d6n77lk67z74cwvyfqwkgbxxxbrp1
──────────────────────────────────────────────────
SECURITY
──────────────────────────────────────────────────
│ DKIM: ✅ Configured
│ Selector: dkim
│ Record: v=DKIM1; k=rsa; p=MIGfMA0GCS...
│ DNSSEC: ❌ Not enabled
──────────────────────────────────────────────────
PROVIDERS
──────────────────────────────────────────────────
│ Hosting: Zimbabwe Online
│ Email: ZOLDNS Lookup Only
# Fetch DNS records for any domain
zwdomain dns example.co.zw
# JSON output
zwdomain dns example.co.zw --jsonCLI Options
| Flag | Description |
|------|-------------|
| -p, --provider | Detect hosting and email providers |
| -j, --json | Output machine-readable JSON |
| -v, --verbose | Show debug information |
Programmatic Usage
const { checkDomain } = require('zwdomain');
// Basic check
const result = await checkDomain('example.co.zw');
console.log(result.available); // true or false
// With provider detection
const result = await checkDomain('example.co.zw', {
detectProvider: true,
verbose: true,
});
console.log(result);Response Format
{
"domain": "example.co.zw",
"available": false,
"dns": {
"nameservers": ["ns1.provider.com", "ns2.provider.com"],
"a_records": ["x.x.x.x"],
"aaaa_records": ["xxx:xxx::x"],
"mx_records": ["mail.example.co.zw"],
"txt_records": ["v=spf1 include:_spf.example.co.zw ~all"],
"cname_records": [],
"dkim": {
"configured": true,
"selectors": [
{
"selector": "default",
"record": "v=DKIM1; k=rsa; p=MIGfMA0..."
}
]
},
"dnssec": false
},
"hosting_provider": "PNRHost",
"email_provider": "Custom Mail Server"
}DKIM Details
The dkim field provides detailed information for email authentication debugging:
const { checkDomain } = require('zwdomain');
const result = await checkDomain('example.co.zw');
if (result.dns.dkim.configured) {
result.dns.dkim.selectors.forEach((s) => {
console.log(`Selector: ${s.selector}`);
console.log(`Record: ${s.record}`);
});
}Checked selectors: default, google, selector1, selector2, mail, k1, k2, dkim, mxvault, zoho
API Reference
checkDomain(domain, options)
Check domain availability and fetch DNS intelligence.
Parameters:
domain(string) — The.co.zwdomain to checkoptions(object) — Configuration optionsdetectProvider(boolean) — Run hosting/email provider detection (default:false)verbose(boolean) — Log debug information (default:false)
Returns: Promise<Object> — Domain information object
isValidCoZwDomain(domain)
Validate that a string is a valid .co.zw domain.
const { isValidCoZwDomain } = require('zwdomain');
isValidCoZwDomain('example.co.zw'); // true
isValidCoZwDomain('example.com'); // falsenormalizeDomain(domain)
Normalize a domain name (lowercase, remove protocol/www).
const { normalizeDomain } = require('zwdomain');
normalizeDomain('HTTPS://WWW.Example.CO.ZW/'); // 'example.co.zw'DNS Module
Direct access to DNS lookup functions:
const { fetchDNSRecords } = require('zwdomain/lib/dnsLookup');
const dns = await fetchDNSRecords('example.co.zw');
console.log(dns.a_records); // ['102.12.34.56']
console.log(dns.mx_records); // ['mail.example.co.zw']
console.log(dns.dkim.configured); // true
console.log(dns.dkim.selectors); // [{ selector: 'default', record: '...' }]TXT Record Labels
The CLI automatically identifies common TXT record types:
| Label | Pattern |
|-------|---------|
| SPF | v=spf1... |
| DMARC | v=DMARC1... |
| Google Verify | google-site-verification=... |
| MS Verify | MS=... |
| Apple Verify | apple-domain... |
| FB Verify | facebook-domain... |
Supported Providers
Hosting Providers
- Cloudflare
- AWS / Amazon Web Services
- Google Cloud
- Microsoft Azure
- DigitalOcean
- Linode/Akamai
- Vercel
- Netlify
- PNRHost
- Afrihost
- ZOL Zimbabwe
- TelOne
- Utande
- Liquid Telecom
Email Providers
- Google Workspace
- Microsoft 365
- Zoho Mail
- ProtonMail
- Fastmail
- Amazon SES
- Mailgun
- SendGrid
- Local providers (ZOL, TelOne, PNRHost)
How It Works
- Availability Check — Queries ZISPA's domain lookup service via HTTP POST
- DNS Resolution — Uses Node.js
dns/promisesfor all record types - DKIM Discovery — Checks common DKIM selectors and retrieves full records
- Provider Detection — Maps IPs to hosting providers via ASN lookup
- Email Detection — Analyzes MX records to identify email services
Requirements
- Node.js 18.0.0 or higher
- Internet connection for ZISPA queries
License
MIT © Nigel Basarokwe
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
Roadmap
- [ ] Support for
.ac.zw,.org.zwdomains - [ ] WHOIS lookup integration
- [ ] Caching layer for repeated queries
- [ ] Bulk domain checking
- [ ] Registration date detection
- [ ] Custom DKIM selector input
