When adding a domain, the following error may occur:(XID xxcadp) The domain "domain.tld" already exists in the userdata.It will occur when a domain exists within an account as either the primary domain, addon domain, or parked domain. To locate whether or not the domain exists on the server, we recommend starting with the following script and files:
grep domain.tld /etc/userdomains
grep domain.tld /var/cpanel/accounting.log
If the domain does not occur within these files, then it is likely "cruft" of an account. To identify whether or not the domain needs to be removed from an account, we recommend reviewing the output of this command:
grep -R domain.tld /var/cpanel/user*
If the domain is listed as an addon of an account, then the easiest way to address the problem would be to attempt to restore the account from a backup. In particular, a backup that still had this addon domain. When the backup restoration completes, attempt removal of the domain once more.
Our Senior Analysts maintain a script on GitHub which will allow for you to locate where a domain resides on a server:
We recommend making use of this script if you are unable to locate where a domain resides on your server.