Check domain availability with Javascript

Check domain availability with Javascript

I see that a lot of people use Google for “javascript check domain availability” so I thought I would help them with the subject. Especially since WhoAPI’s currently most popular function is domain availability checking. But only a small percentage of people that include experts and developers know a difference between 1 domain availability check (with captcha haunting you) and 100 000 daily domain availability checks with our API. Basically, the latter is used to build the prior.

Here’s a great example of how you can build a service for domain availability checks (without captcha). The thing is if you want to use Javascript and check domain availability you only need to connect to an API. Let someone else do the hard lifting for you. You do something that you are passionate about! If you visited WhoNS, you probably saw that it is powered by our domain availability API, which does the heavy lifting.

Here’s what you do:

[source language=”javascript”]

var domain = “”; // domain name you want to check
var rtype = “status”; // check availability
var apikey = “b7ca3c60b14c2333cdd70fbd6b7bab1f”; // your API key// make API call
if(data.indexOf(“error:”) == 0){
// translate error
$.get(‘’+data, function(data) {
$(‘#result’).html(‘Error: ‘+data);
// show the result
$(‘#result’).html(‘Domain availability: ‘+data);

[please wait]

So basically, you we’re checking if the domain name “” is available. If error occurs it will be translated automatically, if not you should see “1” (signals the domain name is taken) as a result string. Its practically the same with PHP.

Unfortunately, you will have to pay a fee for using this solution, so be creative. Meaning, find a way to offer this service so it’s profitable for you too. Naturally, you cannot charge for someone to check domain availability on your website, but I am sure you already found a way you can profit from this (since you are reading this). And if you haven’t, then continue following this blog! I am sure we will write now and then about the huge potential that can come out of this.

WhoNS - Check domain availability with Javascript.

WhoNS – Our, discontinued service that we built in order to check domain availability with Javascript.

For example, why not building a script, or go that far to building a service helping new companies find available domain names. But in a way, they insert 20-200 keywords in one box and 20-200 (or just pick a number) in another box (your script cross-lines the keywords) and deliver the available domain names. That would be cool. Thing is, if you make 200×200 checks, you would need 40 000 checks. Can you imagine a person going hand-by-hand inserting 40 000 names and each time inserting captcha? It would drive them nuts! Write to us what you think about this idea or just comment below!

If however, you want a free way to do javascript checking of domain availability, you are probably going to have a hard time finding an adequate solution. The reasons this is true is because you need to have the infrastructure and the technology to perform massive lookups. Regardless, be it Javascript, Ruby or Python. Big domain registrars aren’t interested in giving up their infrastructure and it’s beginning to be a never-ending problem. So, you got to make sure you can afford the querying – find the right niche and offer value-added service, and solve a problem for your clients. Which then in return, they will be happy to pay for.


  • Phaphama Jabavu
    August 10, 2016

    Hi What would the HTML code look like for the above, I suspect it would be a form that calls the javascipt, am I correct?

    • Goran Duskic
      August 11, 2016

      Yes. It largely depends on the design you want to have around the “checker” itself. It also depends if you used javascript or other scripting languages in order to create the “checker”.

      For example, here you can see other code examples for scripting languages such as PHP, Ruby, Python, Objective C, .Net and Javascript.


Post a Comment