Unable to add an 'add-on' domain to the main account/domain.

vpswing

Well-Known Member
Jun 4, 2014
48
6
58
cPanel Access Level
Root Administrator
When I tried to add an 'add-on' domain via cPanel, I get this error message:

(XID 8vhz48) (XID q4qa79) The domain “tx5.<redacted>.net” already exists in the userdata. at /usr/local/cpanel/Cpanel/Admin/Modules/Cpanel/subdomain.pm line 176.

Checking the WHM DNS Manager, I could see a previous record for that add-on domain - but even after deleting the record via the DNS Manager, I still get the error above. How do I clear that 'userdata' ?

Thanks!
 
Last edited by a moderator:

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
549
255
138
IN
cPanel Access Level
Root Administrator
Check what is the output for the below commands on your server with root user:

Code:
/scripts/whoowns yourdomain.com
cat /etc/userdomains | grep yourdomain.com
cat /var/cpanel/accounting.log | grep yourdomain.com[ICODE]
 

vpswing

Well-Known Member
Jun 4, 2014
48
6
58
cPanel Access Level
Root Administrator
/scripts/whoowns foobar.com => vpswing
cat /etc/userdomains |grep foobar.com => foobar.com: vpswing
cat /var/cpanel/accounting.log|grep foobar.com <-- no result.

The above are fictitious domains
 

HostNoc

Well-Known Member
Feb 20, 2020
155
38
28
Ontario
cPanel Access Level
Root Administrator
HI
Have you checked by login into CPanel of your main domain and check on add-on domain. May be add-on domain you are trying to create is already created

You can also check addon park domain from following command

cat /var/cpanel/userdata/username/main

Regards
HostNoc
 

vpswing

Well-Known Member
Jun 4, 2014
48
6
58
cPanel Access Level
Root Administrator
I see the add-on domain in the /var/cpanel/userdata/username/main file, as well as the individual files in the
/var/cpanel/userdata/username/ directory.

Can I safely edit the 'main' file and also delete the add-on domain files in that directory?

Thanks
 

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
549
255
138
IN
cPanel Access Level
Root Administrator
Is the concerned add-on domain visible in the cPanel interface?
 

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
549
255
138
IN
cPanel Access Level
Root Administrator
It seems there are leftover broken entries for the add-on domains existing on your server causing this issue, to resolve this either you need a backup that still had this addon domain, when the backup restoration completes, attempt removal of the add-on domain once more from the cPanel interface. (Make sure first you take the current data backup on your local machine before proceeding to be on safe side).

OR

Manually remove the left over entries, the certified System Administrators may help you with this.