Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Most efficient way to programmatically determine if a web domain is available?

I am writing some code to determine whether a network domain is registered. For example, I want to check if "Google123.com" is available. There are at least two ways I can do this programmatically, but I'm not sure which is more valid:

  • A) In linux/cygwin, I can launch the whois command to see if a domain is in use.
  • B) In linux/windows, i can launch nslookup command to see if a domain is resolvable.

My questions are:

  1. Is nslookup really a valid way to check for registration? Does every registered domain have a name server and show up in DNS?
  2. What is the fastest way to make this registration check? Any tips or other ways to do it?
like image 306
jm. Avatar asked Sep 20 '08 01:09

jm.


People also ask

How can I find out if a domain name is available?

Navigate to https://domains.google.com/registrar. Enter your preferred domain name in the search box. Review the search results to determine if the domain is available. If it is and you're ready to purchase, buy the domain.

How do I find domain name from URL?

To identify a domain name, look for the "www" in the URL. The domain name is everything that comes after the "www." For example, in the URL http://www.example.com, the domain name is example.com.


2 Answers

In regards to #1, no. There is no requirement that registered domains actually have DNS.

like image 174
nobody Avatar answered Sep 28 '22 00:09

nobody


There are rumours that some of the web sites out there that allow you to search for domains are actually fronts for domain speculators who will buy up the domain as soon as you search for it, and then try to sell it for you. I've never encountered such a scam, but you might want to try a few garbage domain searches on a new site before searching for your dream domain name.

like image 45
Paul Tomblin Avatar answered Sep 27 '22 22:09

Paul Tomblin