When you try to add new domain in cpanel and getting this error The domain “example.com” already exists in the userdata. the domain didn’t exist on the server, yet there were mistaken entries in the following files:
/etc/userdomains [EXISTS]
/etc/localdomains [EXISTS]
/var/cpanel/moddirdomains [EXISTS]
We don’t recommend users modify these files. I’ve removed the entries. You should be able to create the domain now.
Alternative Method To Fix.
The domain “domain.tld” already exists in the user data. This happens when a domain exists in an account as a primary domain, add-on domain, or parked domain. . To determine if a domain exists on the server, we recommend starting with the following scripts and files:
grep -R domain.tld /var/cpanel/user*
When you are unable to add new addon domain or unable to create new cpanel account. This reason case if any of bellow activity you did with the server.
- An account exists on the parent node
- The same account also exists on a child node
- An attempt is made via WHM’s “Modify an Account” interface on the parent node to distribute the account to the child node.
Cpanel::Exception/(XID ksskj5) Account Restore Failed: "Account failure: Failed to create the account: (XID 3vage7) The domain "shahidmalla.com" already exists in the userdata."
To fix this issue, Then remove the account with the following command:
- /scripts/removeacct $cpuser