keepcalculator

06 Numbers and Powers

Whois Command: Get Domain & IP Info

Card No. 06·66666 · Updated · Standard formula, shown below

The whois command is a network utility that queries a public database to return registration details for a domain name or an IP address. You run it from a terminal by typing whois example.com or whois 93.184.216.34, and the output shows the registrar, registration dates, name servers, and contact information for the domain, or the network owner and allocation details for an IP address.

How the Whois Command Works

The whois protocol (RFC 3912) is a simple text-based query over TCP port 43. When you run whois example.com, your client connects to a whois server (often whois.iana.org for IPs or the registry for the TLD) and sends the query. The server responds with a block of text containing the registration record. For domains, the response typically includes:

  • Domain name and registrar (e.g., GoDaddy, Namecheap).
  • Creation, update, and expiration dates.
  • Name servers (DNS servers).
  • Registrant, administrative, and technical contacts (often redacted for privacy).

For IP addresses, the output shows the network range (CIDR), the organization that owns the block, and the regional internet registry (RIR) like ARIN or RIPE. The command is available by default on most Linux and macOS systems; on Windows, you may need to install it or use a web-based whois service.

Why Use Whois?

People use whois for various legitimate purposes:

  • Check if a domain is available before registering.
  • Find the registrar of a domain to transfer or dispute it.
  • Identify the owner of an IP address that is sending spam or attacking your network.
  • Investigate phishing sites or malicious domains.
  • Verify the age and history of a domain for SEO or research.

It is a fundamental tool for network administrators, security analysts, and domain investors. However, since 2018, the GDPR and similar privacy laws have led many registrars to redact personal contact information, so you often see “Redacted for Privacy” instead of a person’s name and email.

Common Whois Problems and Fixes

Sometimes the whois command returns unexpected results. Here are typical issues:

  • No output or timeout: The whois server may be down or blocking your IP. Try a different whois server (e.g., whois -h whois.verisign-grs.com example.com).
  • Output is too long: Some records are verbose. Use whois example.com | less to scroll, or grep for specific fields.
  • Privacy redaction: Contact details are hidden. You may still see the registrar and dates, which are often enough.
  • Different formats: Each TLD has its own registry, so output varies. For .com, you get Verisign data; for .org, PIR; for country codes, local registries.

If you need more structured data, consider using a whois API or a web-based lookup tool that parses the response.

Whois vs. DNS Lookup

Whois is often confused with DNS tools like nslookup or dig. The difference:

  • Whois gives registration and ownership information for the domain or IP block itself.
  • DNS lookup gives the IP address associated with a domain, or the domain associated with an IP (reverse DNS), plus records like MX and TXT.

For example, whois example.com tells you who registered it and when. dig example.com tells you its IP address. Both are useful, but they answer different questions. If you want to know why a site is slow, you might use ping or traceroute, not whois.

Privacy and Safety Considerations

Whois data can be misused. Spammers and scammers harvest email addresses from whois records, which is why privacy protection is now standard. If you register a domain, consider enabling WHOIS privacy (often free) to hide your personal contact information. When using whois to investigate a suspicious domain, be cautious:

  • Do not click links in whois output; they may be malicious.
  • Do not contact the registrant directly unless you have a legitimate reason; they may be the attacker.
  • Use whois as one piece of evidence, not the sole basis for a security decision.

For IP addresses, whois reveals the organization, not the individual user. To report abuse, contact the abuse contact listed in the whois record or the ISP.

Alternatives to the Whois Command

If you don’t have a terminal or prefer a graphical interface, many online whois lookup services exist. They often provide a cleaner output and additional tools like reverse IP lookup or domain history. Some registrars also offer whois directly on their websites. For automation, whois libraries are available in Python (python-whois) and other languages. These alternatives are useful when the command-line output is too raw or when you need to query many domains at once.

Frequently Asked Questions

How do I install whois on Windows?

Windows does not include whois by default. You can download a whois client from Microsoft’s Sysinternals suite, or use a PowerShell script that queries a web service. Alternatively, use the online whois lookup on your registrar’s website.

Why does whois show “Redacted for Privacy”?

Due to GDPR and other privacy laws, registrars hide personal data of domain registrants. This is a legal requirement in many jurisdictions. You can still see the registrar and dates, but not the individual’s name or email.

Can I find the exact owner of an IP address?

Whois shows the organization that owns the IP block, not the individual user. To identify a specific user, you would need a court order or a law enforcement request to the ISP.

What is the difference between whois and RDAP?

RDAP (Registration Data Access Protocol) is a modern replacement for whois that uses JSON and supports more structured queries. Many registries now offer RDAP endpoints, and some whois clients can query both.

How often is whois data updated?

Whois data is updated in near real-time for domain registrations and transfers, but IP allocation data changes less frequently. Some fields like name servers may take a few hours to propagate.

Is whois legal to use?

Yes, whois is a public service. However, using whois data for spam, phishing, or harassment is illegal in many countries. Always respect the purpose of the data.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →