How To WHOIS From a Windows Command Prompt

Posted by Jamie on August 23, 2018

Have you ever wondered who owns a particular website? Every domain name (such as www.techjunkie.com, www.google.com, or www.microsoft.com) is owned by a person, company, or organization, and when the website owner registers the domain name, their contact information goes into a database which is normally accessible to the public. There are a variety of tools available to search that database, and those tools go by the generic name WHOIS (“who is”). One free online tool is ICANN WHOIS. If you visit that site and search to see who owns the www.microsoft.com domain, this is the result:

Surprise, www.microsoft.com is owned by the Microsoft Corporation. Note that there are three different types of contacts – the actual registrant (which might be a front organization of some sort), the administrative contact, and the technical contact. WHOIS is a very convenient tool for anyone doing Internet-related work, as quite often you will want to know who owns or manages a particular website and the information isn’t always easy to find on the website itself.

Usually when someone wants to look up a domain they use a web tool such as ICANN WHOIS or another free WHOIS service online. However, if you find yourself doing a lot of WHOIS searches from your Windows PC, you can save some time by getting a desktop command line tool that lets you do the searches yourself. This can be handy if, for example, the online tool you normally use is down for maintenance, or if you have a lot of WHOIS searches to perform and are running into problems with web interfaces that think you’re a bot and slow or block your searches.

Microsoft makes a WHOIS tool available as part of the Windows Sysinternals toolkit, a suite of tools for server and network administrators. It is free and will work on any Windows desktop on Vista or higher. You can download the WHOIS tool directly from Microsoft here, then extract the archive into a folder somewhere on your computer. If you plan to use WHOIS frequently, extract the executable file to a directory in your system path so that you can run the tool from wherever your command line happens to be.

Run WHOIS from a Windows command prompt

Once you have the tool there is no need to install anything. It’s a simple executable file with no install process.

  1. Open a Windows command prompt.
  2. Type ‘whois’ (or ‘whois64’ if you have a 64-bit version of Windows) and the website you would like to look up, i.e., ‘whois www.microsoft.com’.
  3. Read the results.

Because this is a text-based service, there will be something of a “wall of text” output from your whois program, but in that listing you will see all the same information as you would see from a web-based search: who owns the domain, when it was registered and who with, when it is due for renewal, who the domain is registered to and all sorts of other information about that domain. All of the data you have to provide when registering a domain is available here.

What does it all mean?

Some of the data included in a WHOIS query is obvious. The registrant name, address, contact email, phone and so on is all self-explanatory. But what about the rest?

  • The Registrar is the company with whom the domain owner registered the domain.
  • The Creation Date is when the domain was first registered.
  • The Expiration Date is when the current domain registration expires.
  • Contact are the administrative contact for the domain. .i.e. the person or people who runs the site.
  • Name Servers are the servers that control DNS for the website.

Why would you need to run WHOIS?

There are a few reasons why you might need to run a WHOIS command from a Windows command prompt. Many free WHOIS services try to sell you stuff while you use them and the official ICANN site can get very busy. Plus, if you use it often, it’s better to manage it yourself than depend on someone else.

Why run WHOIS at all? There are a variety of reasons: To see when a domain expires, to see what nameservers are handling DNS, to see who owns a domain so you can lodge a complaint, to contact the owner to see if they want to sell the website and many others. I used to buy and sell domains and would practically live inside WHOIS as I checked out domain ownership and value potential.

For example, say there is a domain name that you really like and want it for yourself. You can run a WHOIS query to find out when it expires. If it is soon, you can mark the date and keep an eye on the domain. If the owner doesn’t renew it you can slip in after the grace period and buy it yourself, or just contact them directly to see if they want to sell it.

Another use for WHOIS is that if you’re changing web hosts, checking the nameserver ensures you have set up DNS correctly. This will ensure people typing in the URL will arrive at the correct place – an essential step in moving from one web host to another.

How to WHOIS from a Windows command prompt3

Running WHOIS in Mac or Linux

Of course, it isn’t just Windows users who would ever run WHOIS. Windows users just need to add the specific tool to do it; macOS and Linux have WHOIS built in to the system so they can run it from a fresh install.

Running WHOIS on a Mac

To run a WHOIS query on a Mac, just do this:

  1. Open Applications, Utilities and Terminal.
  2. Type ‘whois typethedomainnamehere.com’ and hit Enter.

You should see much the same result as in the Windows example above.

Running WHOIS on Linux

Running WHOIS on Linux is much the same, as it is also built in.

  1. Open a Terminal as you would normally.
  2. Type ‘whois typethedomainnamehere.com’ and hit Enter.

You will also see the same kind of entry as Windows and Mac users.

Have any special uses for WHOIS? Share them with us below!

3 thoughts on “How To WHOIS From a Windows Command Prompt”

Rey says:
Drop all the files in c:/windows/system32 so that the commands are global and not have to change directory to where the files are
ducat1ss says:
You will need to download Sysinternals Suite from Microsoft
Pranav Satish Totala says:
Why is it not running in my windows 10. Tried in both Cmd prompt and PowerShell. Says command not found. tried the whois64 too. Do i need to DW any application or library for this command? What is the path for this command?
Carrie says:
I just figured this out. You have to cd into the same location as the file. If you downloaded whois.exe to your desktop, you’d need to do the command:
cd C:\Users\username\Desktop
Once you’re there, you can do whois domain.com and it’ll run it.

Leave a Reply

Your email address will not be published. Required fields are marked *

Disclaimer: Some pages on this site may include an affiliate link. This does not effect our editorial in any way.