LightAtom

whois Command: Look Up Domains and IPs

macOS includes the classic whois client. Use it to see who registered a domain, when it expires, and which organisation owns an IP block.

whois apple.com

Registration details for apple.com, following the registry's referral.

beginner5 minNeeds: Terminal

When to use it

Use whois to check when a domain expires, which registrar it's with, which name servers it uses, or which organisation an IP address belongs to.

Steps

  1. Look up a domain

    whois asks the registry and, for .com, follows the referral to the registrar.
    whois apple.com
  2. Filter the important lines

    Output is long; grep the fields you want.
    whois apple.com | grep -iE 'Registrar:|Creation Date|Expiry|Name Server'
  3. Look up an IP address

    For IPs, whois queries the regional registry (ARIN, RIPE NCC, APNIC…) that assigned the block.
    whois 8.8.8.8
  4. Ask a specific server

    -h queries a chosen whois server, such as IANA to find the registry for a TLD.
    whois -h whois.iana.org com

Output explained

   Domain Name: APPLE.COM
   Registrar: Nom-iq Ltd. dba COM LAUDE
   Creation Date: 1987-02-19T05:00:00Z
   Registry Expiry Date: 2027-02-20T05:00:00Z
   Name Server: A.NS.APPLE.COM
   Name Server: B.NS.APPLE.COM
  • Registrar is where the domain is registered.
  • Creation Date shows apple.com was registered in 1987.
  • Registry Expiry Date is when it must be renewed.
  • Name Server lines are where its DNS records are hosted.

Personal contact details are usually redacted since GDPR; organisation names sometimes remain.

Options and variations

FlagMeaningExample
-h HOSTQuery a specific whois serverwhois -h whois.arin.net 8.8.8.8
-a / -rQuery ARIN / RIPE directlywhois -r 193.0.6.139
| grep -i FIELDShow only lines you care aboutwhois example.com | grep -i expir

Common errors

ErrorCauseFix
No match for domainThe domain isn't registered (or a typo)Check the spelling; it may be available.
Output stops at the registrySome TLDs don't refer to the registrarQuery the registrar's whois server with -h.
Rate limited / connection refusedToo many queriesWait, or query RDAP directly, for example https://rdap.org/domain/example.com.

Do it in the app

For the servers your Mac talks to, LightAtom's connections view already shows the domain behind each IP; use whois to find who owns the address.

Frequently asked questions

Is whois available on Mac?

Yes, macOS includes the whois command. Run whois example.com in Terminal.

How do I find when a domain expires?

Run whois example.com | grep -i expir. Registry Expiry Date is the date the registration ends unless renewed.

What's the difference between whois and RDAP?

RDAP is the modern, structured replacement for whois, returning JSON with consistent fields. The whois command returns free-form text that varies between registries.

LightAtom team

The people who build LightAtom, a network monitor for macOS.