KTDukes

Registered
Sep 28, 2012
2
0
1
cPanel Access Level
Root Administrator
Hello All,

I've made a stupid mistake and accidentally removed an addon domain in the cpanel. Now I'm desperately trying to restore it. I understand my databases and files are still intact... but the site is no longer viewable from the browser. When I try to recreate it, I get an error message saying the domain exists globally. Does anyone know how I can restore this addon domain with the same name back to it's original state? Ahh! Undo Undo Undo!!!

Thank you for your time!
 

Infopro

Well-Known Member
May 20, 2003
17,113
507
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Hmm, I may be wrong here, you should back up the account first just in case. But I think you might need to rename the existing directory created when you first created the addon. I think, the system sees that dir and won't overwrite it. Once you've recreated it, move your files over from the old renamed dir to the new one.

To be sure, you might want to wait a bit for a more exact answer, hopefully better than mine. :)
 

KTDukes

Registered
Sep 28, 2012
2
0
1
cPanel Access Level
Root Administrator
Hi Infopro!

Thank you for responding so quickly!

I've tried renaming the folder directly with cpanel. Funny enough, after I attempted to add it, there it was again in the file manager. So, every time I recreate the addon, even though I get the error, it does actually recreate the directory. Regardless, it does not reappear as an add-on domain in the list, there are no options for it in the DNS settings, and the browser doesn't find it.

Is there anything else that could be floating around the cpanel with that name?

Thank you!!
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
The folder can exist and still create the addon domain, so the folder itself cannot be causing the issue.

The files to check are /var/cpanel/users/username (where username is the cPanel username), /var/named/addondomain.com.db (where addondomain.com is the addon domain name), and /var/cpanel/userdata/username/subdomain.addon.com and /var/cpanel/userdata/username/main files. If you find the addon domain in any of them, you'd want to remove it and the subdomain associated with it.

I have a forum thread where I discuss the various files and how to properly remove an addon or subdomain name. In all likelihood, it's going to even be the subdomain name preventing the creation:

http://forums.cpanel.net/f5/error-d...ot-exist-user-solution-221782.html#post915312