GO KALI FREE

Whois

Information Gathering

Beginnerlow risk

Whois is a query and response protocol used for querying databases that store registered users of Internet resources. It provides information about domain registration, ownership, registrar details, name servers, and expiration dates for any domain or IP address block.

Installation

sudo apt install whois

Basic Syntax

whois <domain-or-ip>

Quick Facts

Tool Type
Command-Line WHOIS Client
Category
Information Gathering
Difficulty
Beginner
Common Usage
Domain & IP Registration Lookup
Platform Support
Linux, macOS, Windows, Termux
Output Type
Structured Text Records
Risk Level
Low (Passive)
Protocol
WHOIS (RFC 3912)

Tool Overview

WHOIS is a standardized query-and-response protocol defined in RFC 3912 that enables users to retrieve publicly available registration data for Internet resources. When you perform a whois lookup, your client queries a centralized WHOIS server maintained by the relevant registrar or Regional Internet Registry (RIR) and returns structured records about domain ownership, name servers, and registration dates.

Domain WHOIS lookups reveal critical details including the registrar name (such as GoDaddy, Namecheap, or Google Domains), the registrant organization or individual, administrative and technical contact information, the domain creation date, the last updated timestamp, the expiration date, and the authoritative name servers that resolve the domain's DNS records. For a complete picture of a domain's infrastructure, combine WHOIS results with DNS Lookup records to see how the domain resolves to IP addresses and mail servers.

IP WHOIS lookups query the five Regional Internet Registries (ARIN, RIPE NCC, APNIC, LACNIC, and AFRINIC) to identify the organization that owns a given IP address block. This information includes the network range (CIDR block), the organization name, the country of registration, and abuse contact details, making IP whois an essential tool for network administrators and threat investigators. For enriched IP intelligence including geolocation, ASN, and ISP details, pair WHOIS results with IP Lookup.

Modern WHOIS databases are increasingly subject to GDPR and privacy regulations. Many registrars now offer WHOIS privacy protection services that replace real contact details with proxy information. This means registrant data may be redacted, incomplete, or show a privacy service instead of the actual domain owner. Understanding these limitations is crucial when conducting domain research.

WHOIS information is invaluable for OSINT investigations, brand protection monitoring, competitive intelligence, threat actor tracking, and verifying the legitimacy of suspicious websites. Security professionals use whois domain lookups to map infrastructure, identify domain age using a Domain Age Checker, and discover related domains registered by the same entity. For suspicious URLs, combine WHOIS data with URL Risk Analyzer to assess threat potential.

Common Commands

whois example.comDomain lookup - Retrieve complete registration details for a domain name
whois google.comLook up Google's domain registration, registrar, and name server information
whois github.comQuery GitHub's domain ownership, creation date, and expiration details
whois 8.8.8.8IP WHOIS lookup - Identify the organization and network block owning an IP address
whois 1.1.1.1IP WHOIS lookup for Cloudflare's public DNS resolver address
whois -h whois.arin.net 8.8.8.8Query ARIN (American Registry for Internet Numbers) for IP allocation details
whois -h whois.iana.org example.comQuery the IANA authoritative server for root-level domain registration data
whois -h whois.ripe.net 8.8.8.8Query RIPE NCC for IP address registration data in the European region
whois example.com | grep -iE 'registrar|creation|expir|name server'Filter output to the key fields: registrar, creation date, expiry, and name servers
whois example.com > whois_example_$(date +%F).txtSave results to a timestamped file for reproducible investigation records
for d in $(cat domains.txt); do echo "== $d =="; whois "$d"; sleep 2; doneBatch lookup a list of domains with a delay to avoid registry rate limits
whois $(dig +short example.com | tail -1)Resolve a domain to its IP with dig, then run IP WHOIS on the result (recon chaining)

Step-by-Step Guide

  1. 1Open a terminal and verify the whois package is installed with: whois --version
  2. 2Run whois followed by the target domain or IP address you want to investigate
  3. 3Identify the registrar name and WHOIS server from the top of the response
  4. 4Review the creation date and expiration date to assess domain age and renewal status
  5. 5Examine the name server entries to understand the target's DNS infrastructure
  6. 6Check the registrant and administrative contact sections for ownership information
  7. 7Note any privacy protection or redaction services that mask the actual owner's identity
  8. 8Document all findings including registrar, dates, name servers, and status codes

Warnings

Use Cases

Domain Research

Investigate domain ownership, registration dates, registrar details, and name server configuration for any publicly registered domain name.

IP WHOIS Lookup

Identify the organization, network block, CIDR range, and country associated with any public IP address through Regional Internet Registry queries.

Registrar Discovery

Determine which registrar manages a domain, find the WHOIS server for that registrar, and extract registrar-specific registration policies.

DNS Investigation

Examine authoritative name servers, DNSSEC status, and DNS configuration details that reveal the target's infrastructure choices.

Ownership Research

Discover the registrant, administrative, and technical contacts for a domain. Identify privacy-protected registrations and proxy services.

Security Reconnaissance

Assess domain age, registration patterns, and infrastructure connections to evaluate the legitimacy and risk profile of a target domain.

Key Features

Comparison

WHOIS vs RDAP

FeatureWHOISRDAP
TransportTCP port 43, plain textHTTPS REST
Output FormatUnstructured free textStructured JSON
Schema ConsistencyVaries per registryStandardized (IETF)
Access ControlAll-or-nothingTiered / authenticated access
InternationalizationLimitedNative UTF-8 support
Successor StatusLegacy (RFC 3912)ICANN-mandated successor
Best ForQuick manual lookupsAutomation & compliance

WHOIS vs DNS Lookup

FeatureWHOISDNS Lookup
Data SourceRegistrar/registry databaseAuthoritative name servers
AnswersWho registered it & whenWhere it resolves right now
Ownership InfoYes (if public)No
Record TypesRegistration fieldsA, AAAA, MX, NS, TXT, CNAME
FreshnessCan lag behind changesReal-time (TTL-bound)
Best ForOwnership & registrationResolution & mail routing

WHOIS vs Amass vs theHarvester (OSINT Recon)

FeatureWHOISAmasstheHarvester
Primary OutputRegistration dataSubdomains & attack surfaceEmails, hosts, names
Data GatheringSingle registry queryAggregates many sourcesAggregates many sources
Passive/ActivePassivePassive + optional activePassive
ScopeOne domain/IPWhole org footprintDomain-wide OSINT
Pipeline RoleSeed / attributionExpansionEnrichment
Best ForOwnership & datesMapping infrastructureContact & host discovery

WHOIS vs Shodan (Passive Intelligence)

FeatureWHOISShodan
FocusRegistration & ownershipExposed services & banners
Data OriginRegistry databasesInternet-wide scan index
Reveals Ports/ServicesNoYes
Historical DataLimited (current)Yes (historical banners)
Query MethodCLI / port 43Web + API
Best ForDomain/IP attributionExposure & service discovery

Domain Enumeration Workflow

FeatureStageToolOutput
1. AttributionWho owns it?WHOIS / RDAPRegistrar, org, dates, name servers
2. DNS EnumerationWhat records exist?dig / DNSenumA, MX, NS, TXT records
3. Subdomain DiscoveryWhat else exists?Subfinder / AmassSubdomains & related hosts
4. HTTP ProbingWhat is live?httpxLive URLs & status codes
5. Tech DetectionWhat runs on it?WhatWebCMS, framework, server
6. Vuln ScanningWhat is weak?Nmap / NucleiPorts, services, findings

Best Practices

Common Errors

whois: command not found
Install it with 'sudo apt install whois' on Debian/Kali, 'sudo dnf install whois' on Fedora, or 'brew install whois' on macOS. Verify with 'whois --version'.
connect: Connection refused / connection timed out
Confirm outbound port 43 is open, retry with a specific server via -h, or fall back to an RDAP/HTTPS lookup if TCP/43 is filtered on your network.
Query rate limit exceeded / too many requests
Add delays between queries in batch loops (e.g., 'sleep 2'), spread queries over time, or use official bulk/RDAP APIs for large-scale lookups.
Registrant fields show REDACTED FOR PRIVACY
This is expected, not an error. Use RDAP tiered access, the registrar's abuse contact, or legal channels for legitimate need-to-know investigations.
No match for domain / No entries found
Verify the spelling and TLD, query the correct registry server with -h, or check whether the ccTLD publishes WHOIS at all (some, like .de, restrict it).
Wrong/incomplete data for an IP address
Query the correct RIR: whois.arin.net (North America), whois.ripe.net (Europe/Middle East), whois.apnic.net (Asia-Pacific), whois.lacnic.net (Latin America), whois.afrinic.net (Africa).
Garbled output for internationalized domain (IDN)
Convert the IDN to its Punycode form first (e.g., with idn2 or a browser), then run whois on the xn-- encoded name.

People Also Ask

Is WHOIS free to use?

Yes. The whois command-line client is free and open source, and querying public WHOIS/RDAP servers costs nothing. Only large-scale commercial bulk APIs and historical WHOIS archives typically charge.

Is a WHOIS lookup legal?

Yes. Querying publicly available registration data is legal in virtually all jurisdictions. What is regulated is how you use the results — harvesting personal contacts for spam or harassment violates GDPR, CAN-SPAM, and similar laws.

Can WHOIS reveal who owns a domain?

Sometimes. If the registrant did not enable privacy protection, WHOIS shows their name and contact details. Since GDPR, most personal registrations are redacted, so you often see a privacy proxy instead of the real owner.

What replaced WHOIS?

RDAP (Registration Data Access Protocol) is the ICANN-mandated successor. It returns structured JSON over HTTPS and supports tiered access, but the classic whois protocol on port 43 is still widely supported.

How do I check when a domain expires?

Run 'whois example.com | grep -i expir' to extract the Registry Expiry Date field. For a quick visual check, use the Domain Age Checker tool.

Learning Path

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5

Related Tools

Dig

Information Gathering

DNS query tool for detailed record lookups, zone transfers, and DNS troubleshooting.

DNSenum

Information Gathering

DNS enumeration tool that gathers records, attempts zone transfers, and brute-forces subdomains for a target domain.

Subfinder

Information Gathering

Passive subdomain discovery tool that finds subdomains using multiple public data sources.

Amass

Information Gathering

In-depth attack surface mapping tool that correlates WHOIS, ASN, and DNS data to map an organization's full footprint.

theHarvester

Information Gathering

OSINT tool that gathers emails, subdomains, hosts, and names from public sources for a target domain.

WhatWeb

Information Gathering

Web fingerprinting tool that identifies CMS platforms, frameworks, and server software on live hosts.

Nmap

Information Gathering

Network scanner for port discovery, service detection, and OS fingerprinting on infrastructure identified through WHOIS.

Frequently Asked Questions

What is WHOIS?

WHOIS is a query-and-response protocol (RFC 3912) used to look up registration data for domain names and IP address blocks. A WHOIS lookup returns the registrar, registrant details (when public), creation and expiration dates, name servers, and domain status codes. It is a core passive reconnaissance and OSINT technique.

How do I perform a WHOIS lookup on Linux?

Install the client with 'sudo apt install whois', then run 'whois example.com' for a domain or 'whois 8.8.8.8' for an IP address. The client automatically selects the correct WHOIS server based on the TLD or IP region. Use -h to query a specific server directly.

Why is WHOIS data hidden or redacted?

Since the EU's GDPR took effect in 2018, most registrars redact personal registrant data or replace it with a privacy proxy service. This is legal and expected. The domain still functions; you simply see 'REDACTED FOR PRIVACY' instead of a name. Legitimate investigators can request data through RDAP tiered access or registrar abuse channels.

What is the difference between WHOIS and RDAP?

WHOIS returns unstructured free text over TCP port 43, while RDAP (Registration Data Access Protocol) returns standardized JSON over HTTPS with tiered access control. RDAP is the ICANN-mandated successor to WHOIS and is far easier to parse programmatically, though the legacy whois protocol remains widely available.

What is the difference between WHOIS and DNS lookup?

WHOIS queries a registrar/registry database and answers 'who registered this domain and when.' A DNS lookup queries authoritative name servers and answers 'where does this domain resolve right now.' They are complementary: WHOIS gives ownership and registration context, DNS gives live resolution data.

How do I do an IP WHOIS lookup?

Run 'whois <ip>' and the client queries the appropriate Regional Internet Registry. For accuracy, target the correct RIR directly: 'whois -h whois.arin.net 8.8.8.8' for North America, whois.ripe.net for Europe, whois.apnic.net for Asia-Pacific, whois.lacnic.net for Latin America, and whois.afrinic.net for Africa. The response shows the org, netblock (CIDR), country, and abuse contact.

What are the five Regional Internet Registries?

The five RIRs manage IP address allocation globally: ARIN (North America), RIPE NCC (Europe, Middle East, Central Asia), APNIC (Asia-Pacific), LACNIC (Latin America and Caribbean), and AFRINIC (Africa). IP WHOIS data lives in whichever RIR allocated the address, so querying the wrong one returns incomplete results.

How do I check a domain's expiration date?

Filter the output: 'whois example.com | grep -i expir'. Look for the 'Registry Expiry Date' field. Track this for your own domains to avoid accidental lapses, and note that expired domains enter a redemptionPeriod before becoming available again.

What do domain status codes mean?

Status codes (EPP codes) describe a domain's operational state. clientTransferProhibited blocks registrar transfers, clientDeleteProhibited prevents deletion, redemptionPeriod means it expired and is in a grace window, pendingDelete means it is queued for removal, and serverHold/clientHold mean it has been suspended by the registry or registrar.

How do I query a specific WHOIS server?

Use the -h flag: 'whois -h whois.verisign-grs.com example.com' queries Verisign directly for .com data. This helps when the default server returns thin or cached data, or when you need registry-authoritative records rather than a registrar's copy.

Why does my WHOIS query say 'command not found'?

The whois client is not installed. Install it with 'sudo apt install whois' (Debian/Kali), 'sudo dnf install whois' (Fedora), 'sudo pacman -S whois' (Arch), or 'brew install whois' (macOS). Verify with 'whois --version'.

What causes WHOIS rate limiting and how do I avoid it?

Registries throttle bulk queries from a single IP to prevent data harvesting. In batch loops, add delays (e.g., 'sleep 2' between lookups), spread queries over time, and for large-scale needs use official RDAP or bulk data APIs rather than scraping port 43.

How do I look up an internationalized domain name (IDN)?

Convert the Unicode name to its Punycode (xn--) form first, then query that. For example, a Cyrillic or accented domain must be encoded to ASCII with a tool like idn2 or a browser before 'whois xn--...' returns accurate data.

Can WHOIS data be faked?

Yes. Registrant-supplied fields can be intentionally falsified, and privacy proxies hide the real owner. Never treat WHOIS ownership claims as proof on their own — corroborate with DNS, SSL certificate data, passive DNS, and other independent sources.

How do I use WHOIS to detect phishing domains?

Check the creation date — domains registered within the last 30 days are a strong phishing signal. Combine a young registration date with privacy protection, suspicious name servers, and a brand-lookalike name to assess risk. The Domain Age Checker speeds this up.

How do I run WHOIS on multiple domains at once?

Use a shell loop: 'for d in a.com b.com c.com; do whois $d; done'. To read from a file: 'while read d; do whois "$d"; sleep 2; done < domains.txt'. Add the sleep to avoid rate limits and redirect output to a file for reporting.

How do I save WHOIS output to a file?

Redirect the output: 'whois example.com > whois_example.txt'. For timestamped, reproducible records in an investigation, use 'whois example.com | tee whois_$(date +%F).txt' so you both see and save the result.

How do I extract just the registrar or name servers?

Pipe through grep: 'whois example.com | grep -i registrar' for registrar info, or 'whois example.com | grep -iE "name server|nserver"' for authoritative name servers. Case-insensitive matching (-i) handles the inconsistent field casing across registries.

Is WHOIS active or passive reconnaissance?

WHOIS is passive reconnaissance — it queries public registry databases, not the target's own systems, so it does not touch or alert the target. This makes it safe for the earliest stage of an authorized engagement, before any active scanning.

Where does WHOIS fit in a reconnaissance workflow?

WHOIS comes first: it attributes a domain or IP to an owner and reveals name servers and netblocks. From there you move to DNS enumeration, subdomain discovery, HTTP probing, technology detection, and finally vulnerability scanning — each stage building on what WHOIS established.

What information does an IP WHOIS reveal?

An IP WHOIS returns the owning organization, the network range in CIDR notation, the country of allocation, the allocating RIR, and an abuse contact for reporting malicious activity. It attributes infrastructure but does not reveal open ports — use Nmap for that.

Why do some ccTLDs not return WHOIS data?

Some country-code registries (for example .de or certain others) restrict or heavily limit public WHOIS for privacy reasons, requiring web-based lookups, CAPTCHAs, or authenticated access. In those cases the port-43 client may return little or nothing, and you use the registry's official web interface instead.

How do I find other domains owned by the same registrant?

Use reverse WHOIS services that index registrant fields, name servers, and registrant emails across the whole database. Because live WHOIS is redacted post-GDPR, historical WHOIS archives and passive DNS often work better for pivoting to related domains.

What is the WHOIS server for .com domains?

Verisign operates the authoritative registry WHOIS server whois.verisign-grs.com for .com and .net. The default whois client routes .com queries there automatically, but you can target it explicitly with 'whois -h whois.verisign-grs.com example.com'.

Does WHOIS work through a proxy or VPN?

WHOIS uses TCP port 43, which some corporate proxies and VPNs block. If lookups time out, confirm outbound 43 is permitted, try a different network, or fall back to RDAP over HTTPS, which traverses standard web proxies far more reliably.

How is WHOIS different from Shodan?

WHOIS tells you who registered a domain or owns an IP block. Shodan tells you what services and banners are exposed on hosts across the internet. WHOIS is for attribution; Shodan is for exposure and service discovery. They complement each other in reconnaissance.

Can I automate WHOIS in a recon pipeline?

Yes. Script whois around your targets, parse fields with grep/awk or a WHOIS-parsing library, and feed the registrar, dates, and name servers into your reporting. For structured, reliable automation at scale, prefer RDAP's JSON output over parsing free-text WHOIS.

What is a redemptionPeriod status?

redemptionPeriod means a domain has expired and entered a roughly 30-day grace window during which only the original registrant can restore it, usually for a fee. After that it moves to pendingDelete and then becomes available for new registration.

Is the whois command the same on all systems?

Mostly. Linux distributions use Marco d'Itri's full-featured client with consistent syntax. macOS ships an older BSD whois (install the Homebrew version for parity), and Windows uses Sysinternals whois or the Linux client under WSL. Core usage — 'whois <target>' and '-h <server>' — is the same everywhere.

How accurate is WHOIS data?

Registration dates, registrar, and name servers are generally reliable because the registry maintains them. Registrant contact fields are less trustworthy — they may be privacy-protected, outdated, or deliberately falsified. Always corroborate ownership claims with independent evidence.

Can WHOIS help with brand protection?

Yes. Monitoring new registrations of brand-lookalike domains across TLDs, checking their registration dates and name servers, and flagging privacy-protected or high-risk registrations lets brand teams detect cybersquatting and typosquatting early and pursue UDRP action.

What is reverse WHOIS?

Reverse WHOIS searches the WHOIS database by a field value — such as a registrant name, email, or organization — to return all domains sharing that value. It is a powerful pivot for mapping an entity's domain portfolio, though GDPR redaction limits it to historical or non-personal data.

Tags

#reconnaissance#domain-lookup#whois#osint#ip-lookup

Output Explanation

WHOIS output displays the registrar responsible for the domain, the registrant and administrative contact details, creation and expiration dates, updated timestamps, authoritative name servers, and domain status codes. Privacy-protected domains show proxy information instead of real owner data. IP WHOIS data reveals the Network Range, Organization, CIDR block, and Country associated with the address.

Ethical Usage Notice

This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.