1. Home

Anil Lakhman

< Blog />

Fetch domain information from who.is programmatically


We have the domain google.com, which we would like to get the domain information for.

First, we need to find the registry that holds the who.is data for .com domains. We do this by retrieving the information from The Internet Assigned Numbers Authority.

whois.iana.org:43 on port 43.

$ telnet whois.iana.org 43

This will return us a bunch of information relating to that TLD. We are looking for this line (should be near the end):

whois:        whois.verisign-grs.com

The who.is server for the .com is whois.verisign-grs.com

Finally we can get the domain information by using telnet to connect to the who.is server, and then typing the domain name (including the TLD).

$ telnet whois.verisign-grs.com 43

You should see all the domain information for this server.

Using whois-servers.net

You can skip the first step above by using whois-servers.net.

Simply prefix the domain to the domain above and telnet it on 43 to be connected to the correct server.

# Connects to whois.verisign-grs.com
$ telnet com.whois-servers.net 43

# Connects to whois.nic.uk
$ telnet co.uk.whois-servers.net 43