This section of our docs explains how to configure domain registrar modules in WHMCS for the selling of domains to allow automated provisioning & management.
Setup > General Settings > Domains is where you configure which domain options you offer (register/transfer/own domain) and various payment and renewal related settings. More info on this specific page and its options can be found @ Domains_Tab
- 1 Registrar Configuration
- 2 Domain Pricing
- 3 Automatic Domain Registration
- 4 Manual Domain Registration
- 5 Automatic Renewal
- 6 Domain Renewals
- 7 Domain Renewal Notices
- 8 Offering Free Domain Registration with Selected Packages
- 9 Adding Additional WHOIS Services
- 10 TLD Specific Additional Domain Fields
- 11 Customising Domain Name Length Restrictions
- 12 Customising Domain Renewal Restrictions
- Domain Registrars can be configured by going to Setup > Products/Services > Domain Registrars
- Choose the registrar you want to configure from the list of available registrars and click the corresponding "Activate" button, then enter the relevant details for your account.
- Each registrar supported by WHMCS has specific instructions & requirements @ http://docs.whmcs.com/Domain_Registrars
- To set the default nameservers that WHMCS will use for domain only registrations ordered through the system, navigate to Setup > General Settings > Domains tab.
For an explanation of how to configure the prices you charge to your clients for domain registration and associated addons refer to the separate Domain Pricing page.
Automatic Domain Registration
- With Automatic Domain Registration, you can automate the submission of registration and transfer requests with the built in registrars
- When enabled, WHMCS will automatically submit the request to the registrar as soon as the client pays you for it
- Domain registrations are never submitted by the system before you get paid
- You can automate some TLDs while not others, and can select which registrar to be used for each TLD you offer
- To enable automatic registration, in Setup > Products/Services > Domain Pricing choose a registrar in the automatic registrar dropdown on each TLD you want to automate
- To not enable automatic registration, leave the dropdown set to None
Note: With automatic domain registration disabled, the system will wait after a client has paid until an admin user manually reviews the order and authorizes it. At that point, the admin user can still initiate the automatic registration by accepting the order once they are happy the order is legitimate.
Manual Domain Registration
Should it be necessary to sell a TLD that is not offered by any of the supported registrar modules modules, then WHMCS can still be used to take the order and invoice the client, but domain registration, renewal and updates must be done manually. The Email Registrar Module facilities this; activate it as you would a normal registrar module (described above) and specify an email address.
Next configure the pricing for the TLD to be registered manually (described above) and select Email from the auto-register dropdown menu. When the domain is ordered or renewed an email will be sent to the the email address notifying manual action is required by you.
Clients will need to contact you to make any modifications to the domain.
- Domain renewals can be enabled for auto submission to the domain registrar as soon as you receive payment for them
- This setting is independant of the auto registration and so you can enable this without enabling auto registration
- To turn this on, go to General Settings > Domains and tick the Auto Renew on Payment checkbox
- Automatic renewal should always be turned off at the registrar, as this would override WHMCS' behaviour and renew regardless of if you get paid or not
- By default, all domains are set to auto-renew.
- But this is not the same as what domain regstrars commonly mean by auto-renew.
- In this case, we mean that an invoice will generate x days (as per your settings) prior to the due date and once paid, the domain will renew.
- It won't ever renew without payment being made.
- It is possible however to set a domain's auto renewal setting to off so that no invoice will generate and it will be allowed to expire.
- This can be done by ticking the Disable Auto Renew checkbox on the domains management page in the admin area or by the client themselves through the toggling of the option in the client area domain details page.
- When the Disable Auto Renew button is clicked, WHMCS checks for any outstanding invoices and if the domain is invoiced on it's own that invoice is cancelled, or if an invoice for multiple items just the line item for the domain in question is removed from it.
- The Upcoming Domain Renewal Notices will still be sent as normal and clients can renew the domain manually if they wish.
Domain Renewal Notices
By default at least two domain renewal notices will be sent prior to expiration, and once following it. The timings can be changed as desired, reminders can be sent before and after a domain's expiration date and even disabled if you want to. The reminder emails are recorded in the client's Email tab, and also logged in the Domain Renewal Reminder Emails report for ICANN compliance (module dependant).
More detailed information about the handling and logging of domain expiration reminder emails is available on the Domain Renewal Notices page
Changing the Intervals at which Renewal Notices are sent
- Begin by going to Setup > Automation Settings
- Scroll to the Domain Reminder Settings section of the page
- Use the dropdown menu to select whether the reminder is sent before or after the domain's expiration date
- You can then change the number of days before/after that the 1st, 2nd, 3rd, 4th & 5th reminders are sent
- You can disable an option by entering 0
Editing the Renewal Notice Email that gets sent
- To edit the email message sent to clients, go to Setup > Email Templates
- The template name used for emails sent before a domain's expiration is Upcoming Domain Renewal Notice
- The template name used for emails sent after a domain's expiration is Expired Domain Notice
- Refer to Email Templates for more info on editing
Offering Free Domain Registration with Selected Packages
With WHMCS, you are able to offer free domains with your packages when purchased with certain payment terms - for example you might want to offer a free domain when a package is purchased annually. The following steps walk you through how to do this.
- Begin by going to Setup > Products/Services > Products/Services
- Next, click the edit icon next to the product or service that you want to offer a free domain with
- Now select the Free Domain tab from the tabs at the top of the page
- Choose the type of free domain you want to offer, either first year free' and renew as normal or for the lifetime of the package
- Then select the payment terms (AKA billing cycles) that you want to offer the free domain with - press Ctrl when clicking the options to select more than one
- Now you need to select which TLDs the free domain offer applies to. This allows you to exclude high priced TLDs such as .tv Again, use Ctrl when clicking the options to select more than one
- Now click the Save Changes button
This package will now not charge the user for the domain when ordered with the specified criteria.
As long as the payment method for the domain and the hosting account is the same, and the next due date is the same, when the time for the invoice to generate comes up (based on the settings in your Automation settings), WHMCS will invoice for the hosting and the domain on the same invoice. When this invoice is paid, WHMCS will (if your settings allow in General Settings > Domains) automatically renew your clients domain for a further period. The hosting account and domains next due date will automatically change to the next period.
Adding Additional WHOIS Services
WHMCS supports a large number of TLDs, however it is possible that you wish to use one not supported by default. You can add any TLD you like by opening the includes/whoisservers.php file. On the bottom line add your entry in the format:
.extension|whois server|match string
Where .extension is the TLD, whois server is the WHOIS server, and the match string is the message returned by the whois server when a domain is available for registration. An extensive list of whois servers can be found at IANA, if it not listed you will need to contact the registry to find out the appropriate information.
The above example will connect to the whois server on port 43, as this is the defacto standard port. However some registries operate their whois server on a different port, and this can be specified in the following format:
.extension|whois server:xx|match string
Where xx is the port number on which the whois server operates.
WHMCS will report the results as returned by the whois servers. Some whois servers may not correctly report reserved or premium domains.
TLD Specific Additional Domain Fields
Certain TLD's have various additional requirements to the regular name & address information that customers normally provide during signup. For example things like Legal Types, Company ID Numbers, Registrant Names, etc... So for these we have a feature in WHMCS called "Additional Domain Fields".
These are defined in the file /includes/additionaldomainfields.php and consist of a name which is used to reference the values via modules, a DisplayName which can be used to override what a client sees in the frontend, and also a LangVar option which overrides even the DisplayName setting to take the field name from the text defined in a language file if set.
With the sub-options of a dropdown field type, those can also be specified in a format so that the display value is different to the value passed through to modules like this: "key|display name". So for example you could have "C11|US Citizen,C12|Permanent Resident,etc..."
This allows you to fully customise and localise the TLD specific additional fields to your customers should you need to add any alternative/additional text or guidance. The data the client provides can be viewed towards the bottom of their Domains tab.
Customising Domain Name Length Restrictions
The major TLDs have length limits included by default and you can specify your own for any others by adding lines such as these to the WHMCS configuration.php file:
$DomainMinLengthRestrictions[".asia"] = 3; $DomainMaxLengthRestrictions[".asia"] = 64; $DomainMinLengthRestrictions[".ws"] = 4; $DomainMaxLengthRestrictions[".ws"] = 63;
Customising Domain Renewal Restrictions
Many TLDs have restrictions surrounding when they can be renewed before and after expiry, this is often referred to as the grace period. For example a .com can typically be renewed 40 days after the expiry date while .uk domains can be renewed between 180 days prior to expiry up to 97 days afterwards (registrar dependent)
The major TLDs have grace periods included by default and you can specify your own for any others by adding lines such as these to the configuration.php file:
$DomainRenewalGracePeriods[".com"] = "40"; $DomainRenewalMinimums[".co.uk"] = "180"; $DomainRenewalGracePeriods[".co.uk"] = "97";
You can also specify multiple grace periods and minimum advance renewal restrictions in a single entry:
$DomainRenewalGracePeriods = array(".com"=>"30",".net"=>"40",".uk"=>"97"); $DomainRenewalMinimums = array(".com"=>"180",".com.au"=>"90");
The existing grace periods pre-defined in WHMCS are:
.com = 30,.net = 30,.org = 30,.info = 15,.biz = 30,.mobi = 30,.name = 30,.asia = 30,.tel = 30,.in = 15,.mn = 30, .bz = 30,.cc = 30,.tv = 30,.eu = 0,.co.uk = 97,.org.uk = 97,.me.uk = 97,.us = 30,.ws = 0,.me = 30,.cn = 30, .nz = 0,.ca = 30
The minimum renewal periods are:
.co.uk = 180,.org.uk = 180,.me.uk = 180,.com.au = 90,.net.au = 90,.org.au = 90
The default minimum length is 3 characters and the default max length is 63 characters.