WHOIS Agent
whois.check.jsWhat This Agent Does
The WHOIS Agent retrieves domain registration information including registrar, creation date, expiration date, nameservers, and registrant details when available.
Category Information
| Property | Value |
|---|---|
| Category Name | Domain Info |
| Category Icon | |
| Source File | src/checks/whois.check.js |
Information Retrieved
Domain Registrar
The company where the domain is registered (e.g., GoDaddy, Namecheap, Cloudflare).
Creation Date
When the domain was first registered. Newer domains may indicate higher risk.
Expiration Date
When the domain registration expires. Soon-to-expire domains may be abandoned.
Updated Date
When domain records were last modified.
Nameservers
DNS servers handling the domain (reveals hosting provider).
Domain Age
Calculated time since domain creation.
Data Sources
Libraries Used
whois— WHOIS lookup library- Or external WHOIS API service
WHOIS Query
const whois = require('whois');
const hostname = new URL(url).hostname;
// Perform WHOIS lookup
whois.lookup(hostname, (err, data) => {
if (err) {
// Handle error
return;
}
// Parse WHOIS data
const registrar = extractField(data, 'Registrar:');
const creationDate = extractField(data, 'Creation Date:');
const expirationDate = extractField(data, 'Expiry Date:');
const nameservers = extractNameservers(data);
});
WHOIS Privacy
Privacy Protection
Many domains use WHOIS privacy protection services that hide registrant details. This is legal and common, but can make it harder to verify site ownership.
Common privacy services include:
- WhoisGuard (Namecheap)
- Domains By Proxy (GoDaddy)
- Cloudflare Privacy Protection
- Contact Privacy Inc.
Domain Age Analysis
| Domain Age | Risk Level | Notes |
|---|---|---|
| < 7 days | High Risk | Very new domains are often used for phishing |
| 7-30 days | Elevated Risk | Still relatively new, warrants caution |
| 1-6 months | Moderate | Could be legitimate new business |
| > 6 months | Lower Risk | Established domain (not a guarantee of safety) |
Return Value
{
category: 'Domain Info',
icon: 'clipboard',
score: null, // Informational, no score
checks: [
{
name: 'Domain Registrar',
status: 'info',
description: 'Registered with Cloudflare, Inc.',
severity: 'low'
},
{
name: 'Domain Age',
status: 'info',
description: 'Domain is 3 years, 2 months old',
severity: 'low'
},
{
name: 'Expiration',
status: 'info' | 'warn',
description: 'Expires in 8 months',
severity: 'low'
}
],
whoisData: {
registrar: 'Cloudflare, Inc.',
creationDate: '2022-10-15',
expirationDate: '2026-10-15',
nameservers: ['ns1.cloudflare.com', 'ns2.cloudflare.com']
}
}