Set Domain Length Restrictions

The main domain extensions (TLDs) include default minimum and maximum length limits. You can customize your own minimum and maximum lengths for other TLDs.

For more information, see Domain Management.


The default minimum length is three characters and the default maximum length is 63 characters for the following TLDs:

Customize Domain Length Restrictions

To do this:

  1. Edit the configuration.php file for your WHMCS installation.
  2. Add $DomainMinLengthRestrictions values for each minimum length and $domainMaxLengthRestrictions values for each maximum length.
  3. Save the file.

For example, adding the following lines to a configuration.php file would require that all .asia domain names contain between three and 64 characters and all .ws domain names contain between four and 63 characters:

$DomainMinLengthRestrictions[".asia"] = 3;
$DomainMaxLengthRestrictions[".asia"] = 64;
$DomainMinLengthRestrictions[".ws"] = 4;
$DomainMaxLengthRestrictions[".ws"] = 63;
For more information about updating the configuration.php file, see The configuration.php File.

Last modified: June 11, 2024