The domain already exists in the userdata


Aug 1, 2019
cPanel Access Level
DataCenter Provider
Hey all, I got a new install with 0 user accounts and 0 domains.

I tried to create a new account but it hung and threw tons of errors because I messed up my user home directory permissions...

BUT home directory permissions are all good now... but now when I try to recreate the user and domain it throws the "The domain “” already exists in the userdata."

However, like I mentioned, there are no users and no domains on the server. It is a new install.

I checked "list users" and none are present on the system. I also checked "parked domains" and "subdomains" and none exist on the system.

I tried to run a couple scripts to fix the issue /scripts/updateuserdomains but did not work.

I did find a domain folder created with some data under "/var/cpanel/userdata/" so I compressed the folder to save the data and removed the folder but still same error.

I eventually did the old WIndow's Reboot trick to see if that fixes anything and nothing...

Any help is greatly appreciated!


Aug 1, 2019
cPanel Access Level
DataCenter Provider
I been looking at all the threads with anything related to the issue and tried the following with 0 success.

1. grep $domain /var/cpanel/userdata/*/* --> Result: Came back with 0 results

2. /scripts/updateuserdatacache

3. /scripts/rebuildhttpdconf && /scripts/restartsrv_httpd

The Two Threads I checked.
The domain already exists in the Apache configuration
The domain already exists apache configuration

Hope this helps; any help is greatly appreciated. :)

============ UPDATE PROBLEM SOLVED =====================

Was able to resolve the issue.

This was the Situation: I wanted to create a new user to be able to manage all my domains from... versus using "root".

This was the Problem: But as I mentioned in this thread cpanel/whm threw the error "The domain “” already exists in the userdata."

WHM threw the error because the hostname for my server was using the domain name I wanted to use while creating my user. I.E. My sever hostname was And I was trying to create a user for :oops:

Therefore, I could not create the user through WHM because of that conflict.

This is the Solution: To resolve the conflict, I used "change hostname" under networking in WHM to change my WHM/CPANEL Hostname to use a different domain. I.E. versus

Then I was able to create a new account with the domain name i wanted to use and all was wonderful in the world again! :cool:;)

Lastly, when the account was created, I went in and changed the server hostname back to my primary root domain. :-D

This piece of
documentation from Cpanel struck the idea in my head to change hostname; so thank you.

Rules For Your Server's Hostname:

  • Do not select a hostname that begins with www or a number, or a hostname that ends with a hyphen (-).
  • You must use a fully-qualified domain name (FQDN) that uniquely identifies the server (for example, or
  • Do not choose a hostname that a cPanel account on your server will use.
  • Do not choose a potential proxy subdomain as a hostname (for example, or
  • Do not select a socially-unacceptable hostname. The hostname will appear in mail headers.
  • Only use lowercase, Latin-script letters in hostnames.
Thanks again to this community. It was really helpful in helping me narrow down the things it could have been with all the previous forum threads to go off by.

Hope this forum thread helps many people as this forum has helped me. Cheers everyone!
Last edited:


Product Owner
Staff member
Nov 14, 2017
Hello @GoCruz

I'm really happy to see you were able to identify the issue and thank you so much for posting the resolution which worked for you.

Generally speaking, it's odd that the hostname caused the conflict as this is a fairly common setup on servers. For example, I use mydomain.tld on my test server and I use the hostname server.mydomain.tld (added before accounts were). If you run into any issues of this nature again I'd suggest opening a ticket with us so that we can look into it further.
  • Like
Reactions: GoCruz