Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm looking for a reliable and up-to-date list of WHOIS Servers to use in a whois script.
It'd be super if it has the string returned by each server when the domain is available.

share|improve this question
    
Why not just use GNU jwhois? It handles this for you. –  Michael Hampton Jul 27 at 18:21

4 Answers 4

up vote 4 down vote accepted

I maintain the list of WHOIS servers for my Ruby WHOIS library at https://github.com/weppos/whois/blob/master/data/tld.json

It contains the list of all existing servers.

It doesn't contain the response when the domain is available because the Ruby library performs parsing at a different level. Also, keep in mind not all registries uses string messages to communicate the unavailability of a domain.

share|improve this answer
    
Link is broken and it does not seem like the ideal source of this information either way. –  Håkan Lindqvist Jul 27 at 18:19
    
I fixed the link, GitHub has slightly changed its URLs. –  Simone Carletti Jul 28 at 7:46

You shouldn't need a list of these. whois(1) is smart enough to figure this out for you:

For the man page:

         By default whois constructs the name of a whois server to use
         from the top-level domain (TLD) of the supplied (single) argu-
         ment, and appending ".whois-servers.net".  This effectively
         allows a suitable whois server to be selected automatically for a
         large number of TLDs.

Whois is generally pretty reliable. I don't ever recall seeing it fail for a domain.

share|improve this answer

you can use this script to get whois servers from IANA. chreated by noys. output in JSON list of zones and whois servers.

<style>
body {
    font: normal 10px verdana, sans-serif;
    color: #333;
}
</style>

<?
$zones = array('ac','am','asia','at','be','biz','biz.ua','biz.ua','br.com','bz','cc','ch','co','co.am','co.in','co.ua','co.ua','om','com.am','com.kz','com.ua','cx','cz','de.com','eu','eu.com','firm.in','fm','gen.in','im','in','ind.in','info','io','kiev.ua','kz','la','lc','li','lt','lu','md','me','mn','mobi','ms','mx','name','net','net.am','net.in','org','org.am','org.in','org.kz','ph','pl','pp.ua','pro','pw','pw','ru','ru.com','so','su','su','su','tel','tv','tw','us','uy.com','vc','ws','xxx','za.cm','xn--p1ai');

$count = count($zones);

echo '<h1>Whois tool</h1>';

echo '<pre>
{
';

for($i=0;$i<$count;$i++) {
    $root_server = 'whois.iana.org';
    $zone = $zones[$i];
    $domain = 'nuceti75.'.$zones[$i];
    //echo "<h2>$domain - $current_domain</h2>";
    $fp = fsockopen($root_server, 43);
    if (!$fp) echo "Connection error: $root_server \r\n";
    else { 
        fputs($fp, $zone."\r\n");
        while (!feof($fp)) {
            $root_answer .= fgets($fp, 128);
        }
        preg_match("~whois:\s(.+)~i", $root_answer, $result);
        $current_server = trim($result[1]);
        fclose($fp);
    } 

    //echo "<pre>$root_answer</pre>";
    //echo "<b>Whois server for this TLD:</b> $current_server";

    $fh = fsockopen($current_server, 43);
    if (!$fh) echo "Connection error: $current_server ($zone) \r\n";
    else { 
        fputs($fh, $domain."\r\n");
        while (!feof($fh)) {
            $current_answer .= fgets($fh, 128);
        }
        fclose($fh);
    }

    //echo "<pre>$current_answer</pre>";

    echo "\"$zone\": \"$current_server\",\r\n";

    unset($root_answer);
    unset($current_answer);
    unset($result);

}

echo '
}
</pre>';

?>
share|improve this answer

There are several well-known ways of locating whois servers for TLDs, the IANA database is probably the closest to what the question asks for, however there are other sources that may be more useful in practice.

From IANA (access via whois and http)

Browse http://www.iana.org/domains/root/db or search the whois database at whois.iana.org for the TLD. Each entry has a field specifying the whois server.

Example:

$ whois -h whois.iana.org com
[Querying whois.iana.org]
[whois.iana.org]
% IANA WHOIS server
% for more information on IANA, visit http://www.iana.org
% This query returned 1 object

domain:       COM

organisation: VeriSign Global Registry Services
address:      12061 Bluemont Way
address:      Reston Virginia 20190
address:      United States

contact:      administrative
name:         Registry Customer Service
organisation: VeriSign Global Registry Services
address:      12061 Bluemont Way
address:      Reston Virginia 20190
address:      United States
phone:        +1 703 925-6999
fax-no:       +1 703 948 3978
e-mail:       info@verisign-grs.com

contact:      technical
name:         Registry Customer Service
organisation: VeriSign Global Registry Services
address:      12061 Bluemont Way
address:      Reston Virginia 20190
address:      United States
phone:        +1 703 925-6999
fax-no:       +1 703 948 3978
e-mail:       info@verisign-grs.com

nserver:      A.GTLD-SERVERS.NET 192.5.6.30 2001:503:a83e:0:0:0:2:30
nserver:      B.GTLD-SERVERS.NET 192.33.14.30 2001:503:231d:0:0:0:2:30
nserver:      C.GTLD-SERVERS.NET 192.26.92.30
nserver:      D.GTLD-SERVERS.NET 192.31.80.30
nserver:      E.GTLD-SERVERS.NET 192.12.94.30
nserver:      F.GTLD-SERVERS.NET 192.35.51.30
nserver:      G.GTLD-SERVERS.NET 192.42.93.30
nserver:      H.GTLD-SERVERS.NET 192.54.112.30
nserver:      I.GTLD-SERVERS.NET 192.43.172.30
nserver:      J.GTLD-SERVERS.NET 192.48.79.30
nserver:      K.GTLD-SERVERS.NET 192.52.178.30
nserver:      L.GTLD-SERVERS.NET 192.41.162.30
nserver:      M.GTLD-SERVERS.NET 192.55.83.30
ds-rdata:     30909 8 2 E2D3C916F6DEEAC73294E8268FB5885044A833FC5459588F4A9184CFC41A5766

whois:        whois.verisign-grs.com

status:       ACTIVE
remarks:      Registration information: http://www.verisign-grs.com

created:      1985-01-01
changed:      2012-02-15
source:       IANA

$

From whois-servers.net (access via DNS)

The name tld.whois-servers.net is a CNAME to the appropriate whois-server. Somewhat unclear who actually maintains this but it seems pretty popular as it's very easy to use this with pretty much any whois client (and some clients default to using this service).

Example:

$ dig com.whois-servers.net +noall +answer

; <<>> DiG 9.9.4-P2-RedHat-9.9.4-15.P2.fc20 <<>> com.whois-servers.net +noall +answer
;; global options: +cmd
com.whois-servers.net.  600     IN      CNAME   whois.verisign-grs.com.
whois.verisign-grs.com. 5       IN      A       199.7.55.74
$

From the registry itself (access via DNS)

Many registries publish the address of their whois server in DNS directly in the relevant zone as a _nicname._tcp SRV record.

Example:

$ dig _nicname._tcp.us SRV +noall +answer

; <<>> DiG 9.9.4-P2-RedHat-9.9.4-15.P2.fc20 <<>> _nicname._tcp.us SRV +noall +answer
;; global options: +cmd
_nicname._tcp.us.       518344  IN      SRV     0 0 43 whois.nic.us.
$
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.