The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'General Discussion' started by OriginalTwist, Feb 10, 2011.

  1. OriginalTwist

    OriginalTwist Registered

    Joined:
    Feb 10, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    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:


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

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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.
     
  3. OriginalTwist

    OriginalTwist Registered

    Joined:
    Feb 10, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  4. Ukris007

    Ukris007 Registered

    Joined:
    Nov 27, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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!
     
  6. pkiula

    pkiula Member

    Joined:
    Jan 14, 2012
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
Loading...

Share This Page