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.

Switching the main domain for an account in WHM

Discussion in 'General Discussion' started by oruen, Aug 2, 2011.

  1. oruen

    oruen Registered

    Joined:
    Aug 2, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi all,

    I am trying to switch the main domain for my client to another domain. For the purpose of testing, I created an account with a main domain sdomain.mydomain.com and addon domain sdomain1.mydomain.com. I removed the sdomain1.mydomain.com and went to WHM. I replaced the sdomain.mydomain.com with the subdomain that was removed. Then I added the replaced subdomain as an addon domain. Everything went fine.

    But... It didn't when I tried to do the same on my client's account. He wanted to switch the main domain with another domain (hisdomain.com to anotherdomain.com). So I removed the addon domain anotherdomain.com (which was the target main domain for the account) and went to WHM. Switching the domains went quite smoothly, no problems occured. But when I tried to add the domain that was the main domain, an error occured. there is a message about editing the httpd.conf file and I have no clue where to find this file and how to edit it. Moreover, to my surprise, the domain that was the main domain for this account appeared as an addon domain in "addon domains" section, but the e-mail accounts related to that domain are no longer on the list in the "email accounts" section. When I try to remove the domain, a message saying that I am not the owner of this domain appears.

    What should I do?

    More info:
    - I have shell access
    - I have access to the root account (but I use the reseller account)

    Thanks in advance for your help
    Oruen
     
  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
    I have one question. If the old main domain is supposed to be an addon domain and it is showing up now as an addon domain, why does that domain need to be removed and re-added as an addon domain? Is the domain not working or pointing to the wrong folder location?
     
  3. oruen

    oruen Registered

    Joined:
    Aug 2, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    There was a lot of e-mail accounts defined for that domain that don't show up in the email accounts section. I have read a tutorial that says that if I remove the domain and then re-attach it, the email accounts will be there again.

    Thanks for your help
    Oruen
     
  4. 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
    The following thread explains what to check to remove the subdomain that likely exists for that addon domain:

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

    You can replace sub with the addon domain name in most instances to see if it exists in any of the files. The main differences would be these greps:

    Code:
    grep addon.com /var/cpanel/users/*
    grep addon.com /etc/*
    grep -R addon.com /var/cpanel/userdata/*
    ls -lah /var/named/addon.com.db
     
Loading...

Share This Page