WHOIS Servers

WHOIS servers determine the availability of domains. In most cases, WHOIS servers will also return the WHOIS Contact Information for a domain.

WHMCS supports a large number of TLDs by default, and you can add other WHOIS servers manually. If you want your customers to be able to check the availability of new domains, WHMCS must use the appropriate WHOIS servers.

WHMCS reports the results from the WHOIS servers. Some WHOIS servers may not correctly report reserved or premium domains.

WHOIS Server Definitions

WHMCS stores data for WHOIS servers in whois.json files. WHMCS ships a default list of WHOIS server definitions, and you can create override files to customize or add to the list.

Definition Data

Definition files contain the following data:

DataDescription
extensionsA comma-separated list of extensions to use this WHOIS server for.
uriThe server’s URI. A WHOIS-based server begins with socket:// while a web-based request begins with http:// or https://. You can add a port using :port on this field.
availableThe string that WHMCS will match against to determine an available domain. This string must only appear in the output when the domain is available.

Default WHOIS Servers

You can find the default shipped WHOIS server definitions in the /resources/domains/dist.whois.json file.

Do not edit this file directly.

Add a WHOIS Server for Domain Availability Checks

The example steps below add a WHOIS server for .aarp.

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.
    WHOIS Registry Information
  2. Run the following command on your server:
    telnet whois.nic.aarp whois
    
  3. Enter any available domain using that TLD (for example, example-domain-check.aarp). The output will show the Whois server’s match string (in this example, No match for):
    No match for "EXAMPLE-DOMAIN-CHECK.AARP".
    
  4. Create a /resources/domains/whois.json file on your server.
  5. Add the TLD extension, the WHOIS server address, and the match string to the file using the following format:
    [
        {        "extensions": ".aarp",
                 "uri": "socket://whois.nic.aarp",
                 "available": "No match for"
        }
    ]
    
  6. Save the file.

Last modified: October 30, 2024