Skip to main content

Terminal: Getting domain name information

Question

How do I get a domain name information using shell?

Answer

Use WHOIS command.

While you can retrieve whois information through the control panel, sometimes it is useful to have it plain text, for example, if you want to automate something.

In most cases, a simpleĀ whois command works fine:

whois openprovider.com

Some registries (e.g. .com and .net) are known asĀ thin registries - they do not store contact data. They refer to the registrar's whois service instead (search forĀ Registrar WHOIS Server in the output). If your whois application does not query this whois server automatically as well, you can do it yourself using theĀ -h option:

whois -h whois.registrar.eu openprovider.com

Sometimes your whois application cannot find a whois server. This often happens with new gTLDs. In such a case, it's again theĀ -hĀ option that you need. Our extension pagesĀ contain the whois servers for most of the registries.

whois -h whois.nic.domains openprovider.domains

Tip: all new gTLDs run their whois server onĀ whois.nic.tld - where "tld" is, of course, the extension that you want to query.