Alpha Coder

Check domain availability from your terminal

I have a theory — that domain registrars share your search queries with resellers. Countless times I’ve had the bad experience of searching for a domain to see its availability then finding out a day/a few days later that it has been bought or made premium. Sure, it’s very possible that it may have been legitly purchased by someone else. But I’ve been in a couple forums where people have complained about the same thing. Also, sometimes the registrar you searched at tells you it has been bought or you have to pay a premium for it but another registrar which you haven’t searched with tells you it’s available and you’re actually able to buy it.

You can boycott registrars by doing a WHOIS lookup on the desired domain instead. If a match is found, info about the domain is displayed but if no match is found, you know the site is available. There are a couple of websites that provide this functionality, most notably https://www.whois.com. Alternatively, you can use the WHOIS CLI tool.

To install, run…

1
$ sudo apt install whois

If you’re a Windows user, you can download the WHOIS CLI here: https://docs.microsoft.com/en-us/sysinternals/downloads/whois.

To check for availability of a site, run whois sitename.tld. E.g:

1
$ whois example.com

If it’s been registered, you’ll get a result like so…

If not, you’ll get something like this…

Subscribe to my newsletter for updates on new articles, courses and more. Enjoy the content on Alpha Coder? Please buy me a coffee.

comments powered by Disqus