Addon Domain Matches Primary Domain From Separate Account - I can't delete the addon

OriginalTwist

Registered
Feb 10, 2011
3
0
51
I have an account (domian1.com) with the an addon domain (domain2.com) that matches the primary domain (domain2.com) of a separate account. I want to delete the addon domain from domain1.com. However when I try i get the error:

Error from park wrapper: Sorry, you do not control the domain domain2.com

Ive tried all the methods in other forum posts and have been unable to successfully remove the addon domain and subdomain from domain1.com.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,606
33
238
somewhere over the rainbow
cPanel Access Level
Root Administrator
Re: Addon Domain Matches Primary Domain From Separate Account - I can't delete the ad

Hello OriginalTwist,

You should be able to remove it manually by removing it from the following locations:

/var/cpanel/users/username file
/var/cpanel/userdata/username/main file
/var/cpanel/userdata/username/sub.domain1.com file

Above please replace username with the cPanel username for the account where the domain is an addon domain, and repalce sub.domain1.com with the name of the subdomain on that account. Also, please make backups before editing any of these files:

Code:
cp /var/cpanel/users/username /var/cpanel/users/username.bak
cp /var/cpanel/userdata/username/main /var/cpanel/userdata/username/main.bak
In the /var/cpanel/users/username file, you'd simply remove the DNS#=addon.com and DNS#=sub.domain1.com entries when editing it. In the /var/cpanel/userdata/username/main file, you'd be removing the addon.com and sub.domain1.com entries under addon and subdomains areas individually. If that is the only addon and subdomain for the account, please ensure the main file ends up looking like the following after editing it:

Code:
--- 
addon_domains: {}

main_domain: domain1.com
parked_domains: []

sub_domains: []
For the sub.domain1.com file at /var/cpanel/userdata/username location, you can simply move rather than remove the entries:

Code:
mv /var/cpanel/userdata/username/sub.domain1.com /var/cpanel/userdata/username/sub.domain1.com.bak
After making all the above changes to remove the domain entries, you would then run the following commands:

Code:
cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak110211
/scripts/updateuserdomains
/scripts/rebuildhttpdconf
/etc/init.d/httpd restart
At that point, the addon domain and subdomain entries should no longer appear in the cPanel for that account.

Thanks.
 

OriginalTwist

Registered
Feb 10, 2011
3
0
51
Re: Addon Domain Matches Primary Domain From Separate Account - I can't delete the ad

Thanks very much for your information. It was truly helpful..every other post just states what to delete but those solutions didn't cover the fact that this domain is assigned to an account.:D
 

Ukris007

Registered
Nov 27, 2011
2
0
51
cPanel Access Level
Root Administrator
Re: Addon Domain Matches Primary Domain From Separate Account - I can't del

Hi,


I could see a main domain is also created with the same name, and I have followed the steps given above still the addon domain is showing under a domain, and I cant delete it same error " Error from park wrapper: Sorry, you do not control the domain "

Please help immediately.

Regards,

Unni
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,606
33
238
somewhere over the rainbow
cPanel Access Level
Root Administrator
Re: Addon Domain Matches Primary Domain From Separate Account - I can't del

Hello Unni,

If this is an emergency, please open up a ticket. The steps I provided are pretty thorough and should have allowed removing the domain. If that didn't work, you'll need to use our ticket system. You can do that via WHM > Support Center > Contact cPanel or using the link in my signature.

Thanks!
 

pkiula

Member
Jan 14, 2012
15
0
51
cPanel Access Level
Root Administrator
Re: Addon Domain Matches Primary Domain From Separate Account - I can't del

Thanks Tristan for this HIGHLY useful post.

To people getting the "someone already owns the domain" -- just edit the dns in the WHM for the old domain and remove the old subdomain entries. That's the only bit missing from Tristan's note.