5/5 - (1 vote)

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

About the Author

Shahid Malla

Shahid Malla is an accomplished system admin and web developer, renowned for his expertise in various fields. With a strong background in WHMCS development, WordPress development, and PHP development, Shahid has honed his skills over the years to deliver exceptional results. As a top-rated freelancer, he has consistently garnered praise and recognition, earning a stellar 5-star rating from a pool of 500 reviews. Shahid's proficiency extends beyond coding and development, encompassing server configuration, server management, and web security. With his extensive knowledge and dedication to delivering high-quality solutions, Shahid Malla is your go-to professional for all your technical needs.

View All Articles