When creating a subdomain with a country-code second-level domain through the cPanel Domains interface, you receive an error like this:
There was a problem creating the sub-domain:
(XID ce27y2) Died at /usr/local/cpanel/Cpanel/Admin/Modules/Cpanel/subdomain.pm line 176.
After looking into user reports, we have found that domains matching our service subdomain names with a country-code second-level domain are not being handled correctly during creation on existing accounts. The backend task is treating the second-level domain as the primary domain and incorrectly generating or updating the DNS zones as a result. When adding the subdomain or an addon domain(as this also creates a subdomain), the creation task will attempt to add a zone file for the country-code second-level domain (ie,
This can be confirmed by checking the cPanel error logs at
/usr/local/cpanel/logs/error_log for output like the following when receiving the error mentioned above. The co.uk is provided as an example, but would match the country-code second-level domain used:
The zone for the root domain co.uk is missing, or could not be read. The IP address will be read from the webserver configuration and a new zone will be created for this subdomain.
(XID sxpw5u) The system cannot create the domain “co.uk” because it is a top-level domain or other public suffix. You must use a different domain name.
Unable to add record for co.uk
Use of uninitialized value $result in die at /usr/local/cpanel/Cpanel/Admin/Modules/Cpanel/subdomain.pm line 176.
We've opened an internal case for our development team to investigate this further; for reference, the case number is CPANEL-36427. Follow this article to receive an email notification when a solution is published in the product.
This behavior only occurs if using a domain that matches one of the service subdomains (ie, mail, webmail, cpanel, whm, or webdisk). Until a resolution is posted we advise using a different domain name if possible.
If this is not an available option, you can create a new cPanel account to host the subdomain instead. This conflict only occurs when adding a subdomain to an existing account. When creating a new account with the same subdomain, this will be created normally.
While it may be possible to create the subdomain with the invalid second-level domain zone present on the system, it has been found that this will encounter different errors during further domain management. This can be used as a temporary workaround, but please be aware of this conflict and that no resolution is available yet for the continued errors.