IT.COM

tips Checking domain name availability without using a website

Spaceship Spaceship
It's long been suspected that registrars may be registering domain names as customers search for them. Whether or not this is true, there's really no reason to be handing potential competitors your list of wanted domain names.

As a domainer, you're probably somewhat familiar with two useful services: DNS and WHOIS. What most people don't know is that WHOIS is actually a protocol that works very similarly to DNS. You can use a WHOIS client on your computer to query WHOIS servers without ever visiting a website that may be logging your requests. By combining DNS and WHOIS, it's a simple matter to test the validity of domains without tipping off the registrars.

Here are some handy instructions to build your own DNS and WHOIS toolkit. Note that checking the availability of a domain requires two steps:
  1. Run a DNS query for the domain name. If the result is NXDOMAIN--short for "non-existent domain"--then you're probably in luck. Note that receiving NXDOMAIN here doesn't necessarily mean the domain isn't registered; it just means there's no DNS information available for the domain.
  2. Run a WHOIS query for the domain name. This will return a definitive result from the registry.
Unfortunately, most registries limit the number of WHOIS queries that you can make in a short period of time. That's why you'll need to run the DNS query first: you'll be able to filter out most of the registered domains that way, and WHOIS will catch the few odd ones that are registered but lack DNS information.

Windows

Windows already comes with a simple DNS tool called nslookup. It's pretty straightforward to use.

Opening the command prompt

First, you'll need to open a command prompt:
  • Windows 7 and later: Open the Start menu or Start screen; you can do this by pressing the Windows key on your keyboard. Type cmd.exe and press Enter.
  • Windows XP and Vista: On your keyboard, hold the Windows key and press R. This will open a small Run dialog, with a single textbox. Type cmd.exe in the textbox and press Enter.
At this point, you should have a black window with white text. The last line will have a directory path, a greater-than symbol, and then a cursor. For example, here's what mine looks like:
Code:
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\Paul>

Don't worry if yours says something a little different. What's important is that you're able to start typing.

Using nslookup

In the command prompt, type nslookup - 8.8.8.8 and press Enter. You should get something that looks like this:
Code:
Default Server:  google-public-dns-a.google.com
Address:  8.8.8.8

>

You'll be able to type after the greater-than symbol on the last line. If you get something different, make sure you types the code exactly as I wrote it, including the spaces.

Note: This will use Google's DNS servers. I chose Google because their DNS servers are fast and reliable, and I've never had an issue with my tested domain names being coincidentally registered the next day. If you don't trust Google, in place of 8.8.8.8, you can use 4.2.2.1 for Microsoft or 208.67.222.222 for OpenDNS. If you're particularly paranoid, you can also query a registry's nameservers directly, but that's beyond the scope of this article. It's important that you not use your ISP's default DNS server.

Now, you'll be able to type domain names and get DNS results. Simply type a domain name, press Enter, and wait for the answer. Here's what you want to see:
Code:
> somecrazynonexistentdomainname.com
Server:  google-public-dns-a.google.com
Address:  8.8.8.8

*** google-public-dns-a.google.com can't find somecrazynonexistentdomainname.com: Non-existent domain

If you get:
  • Non-existent domain: The domain could be available; proceed to WHOIS check
  • Request to _______ timed-out: The DNS request failed; check your Internet connection, try again, or try another DNS server
  • Anything else: The domain is already registered
Using whois

Windows doesn't come with a WHOIS client, sadly. However, Microsoft does provide one that can be downloaded from their Sysinternals website. Here's the link as of writing; if it doesn't work, go to sysinternals.com and navigate to Networking Utilities -> Whois.

The ZIP file from Microsoft Sysinternals will contain a file named whois.exe. Unless you're familiar with configuring the command prompt, you'll probably want to put that in your system directory so that the command prompt automatically knows where to find it. Copy whois.exe to C:\Windows\System32\. If you're unsure how to get to that folder:
  1. Open My Computer, This PC, or the equivalent for your version of Windows.
  2. Several devices and folders will be listed. Open the one named C:. It will likely be called something along the lines of Windows (C:) or Local Disk (C:).
  3. Open the Windows folder.
  4. Open the System32 folder. Note the digits on the end: make sure it's System32 and not just System.
To use whois.exe, you'll need to open another command prompt, as described above. To make a query, type whois, a space, the domain name, and then press Enter. For example:
Code:
C:\Users\Paul>whois somecrazynonexistentdomain.com

Whois v1.11 - Domain information lookup utility
Sysinternals - www.sysinternals.com
Copyright (C) 2005-2012 Mark Russinovich

Connecting to COM.whois-servers.net...
No whois information found.

Not all registries provide proper WHOIS services, unfortunately. Most gTLDs and popular ccTLDs will work. If a domain lacks WHOIS information, it's probably available. Many registries will provide basic WHOIS information for reserved domain names, but not for unregistered premiums, so keep in mind that the domain could still be a premium. If this is the case, it's the registry charging the premium fee, not the registrar. New gTLDs often lack WHOIS information for reserved names as well.

Mac

Mac ships with two awesome Unix utilities that we can use: dig and whois.

Opening a terminal

To use dig and whois, you'll need to open a terminal. You can open Terminal.app just like any other application. On recent versions of Mac, the easiest way is to use Spotlight:
  1. Hold the Command key and press the spacebar
  2. The Spotlight textbox will appear. Type Terminal and press Return.
You should now have a white window with black text. On my computer, the text reads something like this:
Code:
Last login: Wed Jun  3 10:07:10 on ttys001
paul@Pauls-Mac:~$

I've customized mine, so yours will be a little different. Normally, the last line will end with a dollar sign, followed by a block-like cursor.

In the terminal, you can type commands. Each command is a single line; to execute the command, press Return.

Using dig

The following command will run a DNS query with dig:
Code:
dig @8.8.8.8 somecrazynonexistentdomainname.com

Note: This will use Google's DNS servers. I chose Google because their DNS servers are fast and reliable, and I've never had an issue with my tested domain names being coincidentally registered the next day. If you don't trust Google, in place of 8.8.8.8, you can use 4.2.2.1 for Microsoft or 208.67.222.222 for OpenDNS. If you're particularly paranoid, you can also query a registry's nameservers directly, but that's beyond the scope of this article. It's important that you not use your ISP's default DNS server.

Replace the domain name in the command with your own. You'll get something that looks like this:
Code:
; <<>> DiG 9.8.3-P1 <<>> @8.8.8.8 somecrazydomainname.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 20967
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;somecrazydomainname.com.	IN	A

;; AUTHORITY SECTION:
com.			899	IN	SOA	a.gtld-servers.net. nstld.verisign-grs.com. 1433341980 1800 900 604800 86400

;; Query time: 140 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Wed Jun  3 10:33:15 2015
;; MSG SIZE  rcvd: 114

The line we're interested in begins with ->>HEADER<<-. In particular, we want to know the status of the domain name. In this example, the status is NXDOMAIN, which is short for "non-existent domain". If the status is NOERROR, the domain is probably registered.

Using whois

Once we've verified that there's no DNS information with dig, we'll also want to check WHOIS. To do this, you'll need to run a new command in the terminal:
Code:
whois somecrazydomainname.com

Replace the domain name with your own. If the domain is unregistered, you'll get something like this:
Code:
Whois Server Version 2.0

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

No match for "SOMECRAZYDOMAINNAME.COM".
>>> Last update of whois database: Wed, 03 Jun 2015 14:41:33 GMT <<<

There will also probably be a long legal statement to deter abuse.

Not all registries provide proper WHOIS services, unfortunately. Most gTLDs and popular ccTLDs will work. If a domain lacks WHOIS information, it's probably available. Many registries will provide basic WHOIS information for reserved domain names, but not for unregistered premiums, so keep in mind that the domain could still be a premium. If this is the case, it's the registry charging the premium fee, not the registrar. New gTLDs often lack WHOIS information for reserved names as well.
 
58
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
I'm not super tech savvy but this is a great article with awesome step by step instructions! If I understand this process correctly it seems like it is not well suited for bulk checking availability for hundreds or thousands of domains at one time (where I am not concerned with finding WHOIS info and only want to know whether these domains are registered or not); would you agree or am I missing something here?

With a little knowledge of various scripting techniques, there are actually pretty easy ways to automate checking of multiple domains with only a few lines of code. It works best with DNS, as WHOIS tends to be heavily rate-limited. For best compatibility without any third-party software, I'd use bash on Linux/Mac and PowerShell on Windows.
 
3
•••
0
•••
Thank you, great article!
Why is so? To avoid abuse of some kind?

They report statistics to various companies that malicious registrars could theoretically pay for inside info. If you do fully-qualified DNS queries, you mostly avoid that issue. Root nameservers do report limited statistics, but they're delayed, public, and not particularly useful to someone looking to steal your ideas.

Also, many ISPs won't return NXDOMAIN for nonexistent domains; instead, they'll return IP addresses to their own parking pages. This is controversial and the legality varies by country, but in general, it's easiest to just avoid the whole problem. I know it's a common practice in the United States, where I live, though the FCC has been raising a fuss over it.
 
2
•••
Thanks for sharing Paul.

If your Linux distribution doesn't have whois, install in terminal.

Code:
sudo apt-get install whois
 
1
•••
@Paul Buonopane, I do surveys of new domain extensions and I need a way to exclude domain names that do not resolve. Currently, I visit all the websites and check visually. Is there a method to do it by a program. I suppose DNS lookup does not go that far, right?
 
0
•••
@Paul Buonopane, I do surveys of new domain extensions and I need a way to exclude domain names that do not resolve. Currently, I visit all the websites and check visually. Is there a method to do it by a program. I suppose DNS lookup does not go that far, right?

You could try to download the website via HTTP. If you get a connection error you assume that it is not resolving. If you get a response with HTML code in it, it is a website.
 
0
•••
@Paul Buonopane, I do surveys of new domain extensions and I need a way to exclude domain names that do not resolve. Currently, I visit all the websites and check visually. Is there a method to do it by a program. I suppose DNS lookup does not go that far, right?

DNS lookups are very easy to perform programmatically. Just about any language should be able to handle them.

You could try to download the website via HTTP. If you get a connection error you assume that it is not resolving. If you get a response with HTML code in it, it is a website.

A large percentage of registered domains don't have associated websites. Either they don't have an A record, or the A record points to a server that's not listening on port 80.
 
1
•••
You could try to download the website via HTTP. If you get a connection error you assume that it is not resolving. If you get a response with HTML code in it, it is a website.
DNS lookups are very easy to perform programmatically. Just about any language should be able to handle them.
Thanks for the quick reply. I'm trying to write a VBA program in Access on Windows 10 to store domain names that do not resolve, so that I can focus on those with content which I'll check manually. Few years ago I copied from somewhere a VBA program to read a website's content using the following Windows function

Private Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA"

I have not tested it on Windows. I'm just wondering if there's any easier solution.
 
0
•••
Thank you, Paul, even I managed to follow your excellent article.
Regards
Jay
 
1
•••
1
•••
nice, i have a question how can i see words like " honey, money" this type of all words in the dictionery?
 
0
•••
nice, i have a question how can i see words like " honey, money" this type of all words in the dictionery?

If you want to search for existing domains that use those keywords, the most efficient way is to get access to the registries' zone files. Those contain lists of most registered domain names, so you can quickly search them using tools that are meant for dealing with large text files (e.g., grep or HxD).

If you want to search for available domains, you'll need to work backwards: generate a list of domains that match your criteria and pick out any that aren't already in the zone files. This can be efficiently automated, but doing so requires basic programming knowledge. More advanced programming knowledge is necessary to make a system that operates with good performance, particularly knowledge of structures such as hash buckets, binary search trees, and efficient on-disk databases. You could avoid the latter prerequisite by performing the operation on a computer with a large amount of RAM; 32 GiB would definitely be sufficient for .com, but you might be able to get away with 16 GiB if you optimize your hash bucket or BST implementation.
 
2
•••
If you want to search for existing domains that use those keywords, the most efficient way is to get access to the registries' zone files..

Hi Paul, where can we get access to zone files (free if possible) for .com and other extensions?
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back