-1

I'm not getting any output at all when doing a simple WHOIS command in the macOS terminal.

Just seems to run and then is ready for the next command. Every online tutorial or article I've seen shows a response back with the WHOIS information.

Why isn't this working for me?

enter image description here

Lee
  • 4,187
  • 6
  • 25
  • 71
  • 1
    It doesn't work for me either and I have no idea why. However, `whois -i apple.com` gives reasonable results if you're looking for a workaround rather than an explanation. – Phillip Mills Nov 11 '21 at 13:54

1 Answers1

1

whois doesn't know where to look up that domain.

You'll need to provide:

  1. An -h <host> to a register, eg whois.markmonitor.com
  2. Use -i option to use the traditional Network Information Center [link]

From man whois:

-h host

Use the specified host instead of the default. Either a host name or an IP address may be specified.


-i

Use the traditional Network Information Center (InterNIC) (whois.internic.net) database. This now contains only registrations for domain names under .COM, .NET, .EDU. You can specify the type of object to search for like whois -i 'type name' where type can be domain, nameserver, registrar. The name can contain * wildcards.

[man link]


For example, instead of whois google.com, use

  1. whois -h whois.markmonitor.com google.com
    
  2. whois -i google.com
    

Both the -h and -i will output slightly different results.

A glims of a CLI output:

enter image description here

0stone0
  • 34,288
  • 4
  • 39
  • 64
  • 1
    Thank you. Just using whois -i apple.com is working fine for me. – Lee Nov 11 '21 at 14:05
  • The `-i` is fine in most cases. Just remember it only contains **com**, **net** and **edu** as shown in the man page quote above. – 0stone0 Nov 11 '21 at 14:10