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:
- Find the Whois server for the desired TLD. In most cases, you can find this in the IANA root database.
- 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
- Enter any available domain using that TLD (for example,
example-domain-check.co.ke
orexample-domain-check.africa
). The output will show the Whois server’s match string (in this example,No Object Found
orNo match for
):
No Object Found for "EXAMPLE-DOMAIN-CHECK.CO.KE".
or
No match for "EXAMPLE-DOMAIN-CHECK.AFRICA".
- Create a
/resources/domains/whois.json
file on your server. - 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"
}
- Save the file.