Adding New Domain Availability Checks in WHMCS


Adding New Domain Availability Checks

If you want your customers to be able to check the availability of new domains, you will need to add the appropriate Whois servers.

The example steps below add a Whois server for .ke, .co.ke, and other .ke extensions, as well as .africa.

Add Domain Availability Checks

To add a new Whois server to WHMCS:

  1. Find the Whois server for the desired TLD. In most cases, you can find this in the IANA root database.
  2. Run the following command on your server:
   whois -h whois.kenic.or.ke example-domain-check.co.ke

or for .africa:

   whois -h whois.nic.africa example-domain-check.africa
  1. Enter any available domain using that TLD (for example, example-domain-check.co.ke or example-domain-check.africa). The output will show the Whois server’s match string (in this example, No Object Found or No match for):
   No Object Found for "EXAMPLE-DOMAIN-CHECK.CO.KE".

or

   No match for "EXAMPLE-DOMAIN-CHECK.AFRICA".
  1. Create a /resources/domains/whois.json file on your server.
  2. Add the TLD extensions, the Whois server address, and the match string to the file using the following format:
   
       {        
           "extensions": ".ke, .co.ke, .or.ke, .go.ke, .ac.ke, .sc.ke, .me.ke, .mobi.ke, .info.ke, .net.ke",
           "uri": "socket://whois.kenic.or.ke",
           "available": "No Object Found"
       },
       {
           "extensions": ".africa",
           "uri": "socket://whois.nic.africa",
           "available": "No match for"
       }
   
  1. Save the file.