DEV Community

Cover image for Hosting Checker - How to find out where the website is hosted via Terminal?
Stan Kukučka
Stan Kukučka

Posted on • Edited on

Hosting Checker - How to find out where the website is hosted via Terminal?

It can be some basic background check or a serious need to identify what hosting is used for certain web services. It can be practical to identify why is a certain website so quick to load or try to decide what hosting service will be best for a similar online service you have found.

There is tons of online service that claim to detect the hosting service of a particular website. Mostly named "hosting checkers". But you don't have certainty if the returned result is valid.

Where is your or other website hosted?

To this question, you can have a few different answers. Hosting is mostly a collection of a variety of different services. It is possible to have all your hosting services "made" in a single company. But it's not uncommon to see a having website and each of its hosting services provided through several hosting companies. As an example, services can vary to these:

  • Domain Registration
  • Hosted DNS
  • Web hosting
  • CDN
  • Email Hosting

In this short article, we are going to focus on the website's web hosting detection via terminal command prompt.

Website hosting checker background

This quick guide will provide you with instructions on how you can run a web hosting check with a simple command. Before a needs to be done brief installation procedure and then you can jump on research to find out who is hosting the website you would like to know about.You have to do these:

  • Install Nmap the Network Mapper - Free Security Scanner
  • Enter specific command into Terminal

This quick tut will focus on the installation process for OSX systems.

How to install Nmap the Network Mapper

Nmap binaries for Apple macOS (x86-64) are available in this Mac OS X Binaries section. You can find out the latest stable release installer is nmap-7.93.dmg. Download it and open the dmg file to start the installation.

Image description

You'll be blocked by default in your system. So you have to head to System Settings > Privacy & Security and scroll down to the Security section where you can notice this message to approve with the Open Anyway button.

Image description

Let's start with hosting checker in your Terminal

Now just head to Applications > Utilities and look for Terminal.app. Open the Terminal and add this simple command that starts with nmap then you enter the domain name without HTTP/S and WWW prefixes and at the end you run nmap script --script whois-ip. The whole command looks like hereunder.



nmap yourwebsite.com --script whois-ip


Enter fullscreen mode Exit fullscreen mode

You will get a long list of open ports where at the end will pops-up these Host script results like in this example.



Host script results:
| whois-ip: Record found at whois.arin.net
| netrange: 75.1.0.0 - 75.1.134.255
| netname: AMAZO-2
| orgname: Amazon.com, Inc.
| orgid: AMAZO-2
| country: US stateprov: WA
| orgtechname: Amazon EC2 Network Operations
|_orgtechemail: amzn-noc-contact@amazon.com


Enter fullscreen mode Exit fullscreen mode

Based on the netname or orgname you can easily identify what hosting is your desired website on. To be more specific in a technocratic way netrange will provide a range of IPs.

And that's all. The whole magic. How to check website hosting via the terminal anytime you need. No need to rely on random online tools with uncertain results.

Thanks to Taylor Vick for the cover image from Unsplash.

Latest comments (0)