Invalid Domain Errors

Problem

While managing a domain in the Admin Area, you see an Oops! error page that displays the following error:

ERROR: WHMCS\Exception\InvalidDomain: The domain is invalid. in /path/to/whmcs/vendor/whmcs/whmcs-foundation/lib/Domains/Idna.php:0

Cause

The value in the tbldomains.domain field of your MySQL® database contains an invalid character. For example, it may contain a blank space at the beginning or end.

The system validates the entered domain value to prevent invalid data. The invalid data in your database likely originated from an external source or something inserted it into the database directly.

Solution

Edit the record directly in the tbldomains table of the MySQL database to remove the invalid character from the domain field.

Last modified: October 29, 2024