Set Domain Length Restrictions

This information only applies to self-hosted WHMCS installations. WHMCS Cloud does not currently support direct access to WHMCS files and databases.

The main domain extensions (TLDs) include default minimum and maximum length limits. You can customize your own minimum and maximum lengths for other TLDs on self-hosted WHMCS installations.

For more information, see Domain Management.

Defaults

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

.asia.biz.bz.cc.ch
.co.uk.com.de.info.in
.jp.li.me.me.uk.mn
.mobi.name.net.net.uk.org
.org.uk.tel.tv.us

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: 2025 October 17