Skip to main content

Domain Registration

Registration of a new domain name is triggered automatically by WHMCS as soon as payment for an order is confirmed (or immediately if the order is validated manually). Here is a detailed breakdown of the process.

Client-side Registration Flow

  1. The client performs an availability search from your WHMCS cart
  2. They select the desired domain and choose the duration (1 year, 2 years, etc.)
  3. They fill in contact information (owner, administrative, technical, billing)
  4. If the TLD requires additional fields (e.g. .fr → AFNIC code), these fields appear automatically
  5. They validate and pay the order
  6. WHMCS automatically triggers the API call to HostMyServers to register the domain

Technical Flow (module → API)

When WHMCS calls the module's RegisterDomain function:

  1. The module builds the API request with:
    • The full domain name (e.g. mydomain.fr)
    • The duration in years
    • The nameservers (client's or configured default nameservers)
    • WHOIS contacts (owner)
    • TLD-specific additional fields (if applicable)
  2. The request is sent to the HostMyServers API via cURL (HTTPS)
  3. The API returns a success status or an error message
  4. On success, WHMCS updates the domain status to Active and records the expiry date

Managing Asynchronous Registrations

Some TLDs (particularly new extensions and certain ccTLDs) do not register the domain immediately. Registration can take from a few minutes to several hours. In this case:

  • WHMCS marks the domain as Pending
  • The synchronisation cron task regularly checks the status with HostMyServers
  • As soon as registration is confirmed, the status automatically switches to Active

The client receives a confirmation email only when the domain switches to Active status.

Manual Registration from the Back Office

An administrator can register a domain manually (without going through the client cart):

  1. Clients → select the client
  2. Add New Product/ServiceDomain
  3. Fill in the domain, duration, registrar (HostMyServers)
  4. Check Run Module Command Now to trigger registration immediately
  5. Click Add

WHOIS Contact Information

WHOIS information is filled in at the time of order and transmitted to HostMyServers at registration. If the client does not fill in their contact information in WHMCS, the module uses their account data (first name, last name, address, email, phone).

WHOIS Data Accuracy

Registries require that WHOIS data be accurate and up to date. Incorrect data can result in the domain being suspended or deleted by the registry. Inform your clients of this obligation.

Common Registration Errors

Error messageProbable causeSolution
Domain not availableThe domain was registered between the search and the orderAsk the client to search for another name
Invalid contact dataA required contact field is missing or invalidCheck and correct client data in WHMCS
Insufficient fundsInsufficient HostMyServers balanceTop up the account from the HostMyServers client area
Invalid TLDThe extension is not supported by HostMyServersCheck the available TLD catalogue in the client area
Additional field requiredRequired additional field missing for this TLDVerify that additional fields are properly filled in the order