How do I query a Whois server using a socket?
Author: Deron Eriksson
Description: This Java tutorial describes how to query a Whois server via a Socket.
Tutorial created using: Windows XP || JDK 1.5.0_09 || Eclipse Web Tools Platform 2.0 (Eclipse 3.3.0)

Page: < 1 2

(Continued from page 1)

The console results of executing the WhoisQuery class are shown below. Notice that '' is queried at and

**** Performing whois query for '' at
Visit for more information about ABCNEWS.COM
<a href="">AboutUs: ABCNEWS.COM </a>

ABC, Inc.
   77 West 66th Street
   506 Second Ave. Suite 2100
   New York, NY 10023-6298

   Domain Name: ABCNEWS.COM

   Promote your business to millions of viewers for only $1 a month
   Learn how you can get an Enhanced Business Listing here for your domain name.
   Learn more at

   Administrative Contact, Technical Contact:		dns-ops@DIG.COM
      506 2ND AVE STE 2100
      SEATTLE, WA 98104-2300
      (206) 664-4000 fax: (206) 664-4009

   Record expires on 21-Apr-2008.
   Record created on 20-Apr-1995.
   Database last updated on 29-Nov-2007 11:54:01 EST.

   Domain servers in listed order:

**** Performing whois query for '' at

Whois Server Version 1.3

Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to
for detailed information.

   Domain Name: ABCNEWS.COM
   Whois Server:
   Referral URL:
   Name Server: SENS01.DIG.COM
   Name Server: SENS02.DIG.COM
   Name Server: ORNS01.DIG.COM
   Name Server: ORNS02.DIG.COM
   Status: clientTransferProhibited
   Updated Date: 06-apr-2007
   Creation Date: 20-apr-1995
   Expiration Date: 21-apr-2008

>>> Last update of whois database: Sun, 20 Jan 2008 20:56:58 UTC <<<

NOTICE: The expiration date displayed in this record is the date the
registrar's sponsorship of the domain name registration in the registry is
currently set to expire. This date does not necessarily reflect the expiration
date of the domain name registrant's agreement with the sponsoring
registrar.  Users may consult the sponsoring registrar's Whois database to
view the registrar's reported date of expiration for this registration.

TERMS OF USE: You are not authorized to access or query our Whois
database through the use of electronic processes that are high-volume and
automated except as reasonably necessary to register domain names or
modify existing registrations; the Data in VeriSign Global Registry
Services' ("VeriSign") Whois database is provided by VeriSign for
information purposes only, and to assist persons in obtaining information
about or related to a domain name registration record. VeriSign does not
guarantee its accuracy. By submitting a Whois query, you agree to abide
by the following terms of use: You agree that you may use this Data only
for lawful purposes and that under no circumstances will you use this Data
to: (1) allow, enable, or otherwise support the transmission of mass
unsolicited, commercial advertising or solicitations via e-mail, telephone,
or facsimile; or (2) enable high volume, automated, electronic processes
that apply to VeriSign (or its computer systems). The compilation,
repackaging, dissemination or other use of this Data is expressly
prohibited without the prior written consent of VeriSign. You agree not to
use electronic processes that are automated and high-volume to access or
query the Whois database except as reasonably necessary to register
domain names or modify existing registrations. VeriSign reserves the right
to restrict your access to the Whois database in its sole discretion to ensure
operational stability.  VeriSign may restrict or terminate your access to the
Whois database for failure to abide by these terms of use. VeriSign
reserves the right to modify these terms at any time.

The Registry database contains ONLY .COM, .NET, .EDU domains and

As a last point, notice that querying the different WhoisW servers returns different information.

Page: < 1 2