Every domain name investor uses WHOIS on a daily basis to check registrant information on domain names, but few understand the mechanics behind it and what you can do with that knowledge. Consider this your education. I am not only going to explain how WHOIS data is retrieved, but also give you examples of how you can harness this information to streamline common tasks related to domain investing. I will be providing working code for most of the examples, but don’t let that frighten you off. It can be directly uploaded to your server and works out of the box (with the proper server setup).
To understand how WHOIS works, you must first understand that there are two types of WHOIS models, “thick” and “thin”. In the thick model, registrant information from all registrars is stored centrally, meaning in one location. This model provides for consistent data in terms of both formatting and the fields presented, and is used by .org and a few ccTLDs. In the thin model, registrant information is stored by the registrar the domain is managed by. This model is used by most gTLDs such as .com, .net, .info, and by just about every ccTLD. At this point you should be wondering: if the data isn’t stored in one location, how do you go about accessing it?
To access registrant information that is stored at the registrar level, you must first determine which registrar the domain is at and what the address of its WHOIS server is. That is where CenterGate Research Group comes in. They provide a free service at whois-servers.net that, when queried properly through software, will tell you the registrar, WHOIS server, name servers, creation/expiration date, and status. The service listens on port 43 at ext.whois-servers.net where ext is the extension of the domain you are checking. CRG does not limit or throttle the number of requests you can make, so keep that in mind for later. A response for a thick-model query contains the registrant information. A response for a thin-model query looks like this:
Domain Name: DNMEDIA.COM Registrar: GODADDY.COM, INC. Whois Server: whois.godaddy.com Referral URL: http://registrar.godaddy.com Name Server: NS1385.HOSTGATOR.COM Name Server: NS1386.HOSTGATOR.COM Status: clientDeleteProhibited Status: clientRenewProhibited Status: clientTransferProhibited Status: clientUpdateProhibited Updated Date: 23-jan-2009 Creation Date: 11-sep-2005 Expiration Date: 11-sep-2011
The line we care about is “Whois Server”. We now know where we have to query to get the registrant information. One more request and we’ve got our data. Let’s stop for a moment and see what a response looks like from a thin query when a domain is not taken by someone else and is available to register (the response for thick query is “NOT FOUND”):
No match for "TSATWERASFSADF.com".
You’re probably wondering where I am going with this tangent. One common question I see on the forums is how to do a bulk availability check. When I say bulk, I’m not talking about 100 or 500, I’m talking about 10,000 or 50,000. The script below presents you with a text area to paste domains, loops through querying whois-servers.net until all have been checked, and then displays the available ones. This has two major advantages over checking availability at a registrar. The first is obviously that you are not limited to 500 results. The second is that you don’t have to worry about front-running, because the script is executing on your own server and you have complete control. Nobody will be selling your searches, and thus I recommend using this script to check availability even if it isn’t in bulk. If you’re scanning a big list, you need to make sure the max execution time for scripts on your server is set to 0 (zero) so it doesn’t time out.
That’s pretty useful, but the real power comes when we do the second query, the one to the actual WHOIS server holding the data.
Let’s say you have a domain name that you’re trying to sell to an end user… you’re probably going to end up sending 50-100 emails. Having to check the WHOIS for each end user’s domain is really time consuming. If your WHOIS source displays the email in plain text for you to copy/paste, they usually have a CAPTCHA to slow you down. Otherwise, like DomainTools, they will usually display the email in an image and you can’t copy it. Regardless, doing all of those WHOIS queries one at a time just plain sucks. Well, with the following script you can paste the list of domains you want to email a pitch to, and it will output a list of their email addresses in CSV Format.
TIP: Enter keywords for the domain you are trying to sell at DomainTools.com Domain Search and it will give you a list of domains that are related to your keywords. You can use this to find prospects in addition to standard methods such as checking who is bidding in Adwords, who shows up in search engine results, etc.
IMPORTANT NOTICE: It is against the TOS of all registries and registrars to query the WHOIS database for mass, indescriminate, emailings. Only use the bulk WHOIS script once you have narrowed down your prospect list, and send out a personalized email to each company. Do not abuse this script… and remember, I’m not responsible for what you do with it. Spamming can get you slammed with some very heavy fines, so use your best judgement.
I hope you enjoyed this article, and if you have any questions please don’t hesitate to ask.