1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Help on changing primary domain

Discussion in 'Plesk 11.x for Linux' started by ZieglerM, Jan 18, 2013.

  1. ZieglerM

    ZieglerM Basic Pleskian

    14
    35%
    Joined:
    Jun 13, 2011
    Messages:
    41
    Likes Received:
    0
    Hi All,

    i'm running the latest version of Plesk and need to change the primary domain. Unfortunately i'm not quite sure what's the best and safest way doing that.

    dedicated ip address -> primary domain
    shared ip address -> customer domains

    What's the best way for changing the primary domain AND to keep all email accounts (rename them), settings, etc?

    Any help is appreciated.

    Thanks, Martin
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,564
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    What do you mean exactly - primary domain?
     
  3. ZieglerM

    ZieglerM Basic Pleskian

    14
    35%
    Joined:
    Jun 13, 2011
    Messages:
    41
    Likes Received:
    0
    ok, will try to explain it more detailed...

    server hostname <host.domain1> with two ip addresses

    Plesk hostname configured <host.domain1>

    Configured domains in Plesk: domain1, domain2, domain3, [...]

    I just sold domain1 and need to delete it on the server. domain5 should replace domain1.

    Does that explain the situation?
     
  4. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,564
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    Go yo Tools & Settings>Server settings and change hostname.domain1 to hostname.domain5 there.
     
  5. ZieglerM

    ZieglerM Basic Pleskian

    14
    35%
    Joined:
    Jun 13, 2011
    Messages:
    41
    Likes Received:
    0
    And that will also change all email accounts and settings from domain1 to domain5?
     
  6. ZieglerM

    ZieglerM Basic Pleskian

    14
    35%
    Joined:
    Jun 13, 2011
    Messages:
    41
    Likes Received:
    0
    Can you please let me know? I need to do the changes next week.
     
  7. Faris Raouf

    Faris Raouf Silver Pleskian Plesk Guru

    31
    30%
    Joined:
    Mar 15, 2009
    Messages:
    667
    Likes Received:
    17
    Can you explain what you want to happen please? I don't quite understand. What email accounts and what settings?
     
  8. ZieglerM

    ZieglerM Basic Pleskian

    14
    35%
    Joined:
    Jun 13, 2011
    Messages:
    41
    Likes Received:
    0
    I'll try tro explain it again.

    My primary domain ist domain1. Primary means, the server where Plesk is running has the hostname host.domain1. There are also multiple existing email accounts. I sold domain1 and therefore i have to change domain1 to domain2.

    What is the best way doing that but keeping all the email accounts and it's content. For example: user1.domain1 will get user1.domain2.

    Does that explain the question?

    Thanks, Martin
     
  9. Faris Raouf

    Faris Raouf Silver Pleskian Plesk Guru

    31
    30%
    Joined:
    Mar 15, 2009
    Messages:
    667
    Likes Received:
    17
    It kind of answers the question, I suppose. The sticking point is that since you already have a domain2, one assumes that it has email accounts on it, and that you'd want to be using those not email accounts counfigured for domain1.

    Anyway, yes, you can do what you want, sort of, maybe.

    If you delete domain2 completely, you can then "rename" domain1 to domain2. To do this, open domain1 in the control panel, click on Websites & Domains tab, click on Show Advanced Options, and select Website scripting and security.

    In the general tab you'll see the Domain name box, where it will show domain1. Just change that to domain2.

    /var/www/vhosts/domain1 then gets automatically renamed to domain2. Contents remain the same. Passwords remain the same. Usernames remain the same. Email accounts become whatever@domain2 with their original passwords and mailbox contents. DNS settings gets changed to domain2. Basically this does what you need as far as I can tell.

    I'm not completely sure whether it matters if you change the hostname before or after doing this. The problem is that if the hostname does not resolve on the server you can experience big problems. Maybe you should change the hostname to domain3 (or something), make sure all is well with everything, then do all these domain deletings and changes and renames and so on. Then, with domain2 firmly in place and DNS correct and resolving etc etc, change hostname again to domain2.

    WARNING: This is a big change to make. I strongly suggest you create tesdomain1, add some email accounts. Send it some email. Upload a website. Then rename it to testdomain2 as outlined above. Does everything change correctly and in the way you expected? If yes, then great. If no, then see what has gone wrong and be prepared for the same thing to happen when you do it on the real domain1.

    I'd also strongly recommend you backup everything before making the big change.
     
  10. ZieglerM

    ZieglerM Basic Pleskian

    14
    35%
    Joined:
    Jun 13, 2011
    Messages:
    41
    Likes Received:
    0
    Thank you. Will test it and see how it goes.
     
  11. ZieglerM

    ZieglerM Basic Pleskian

    14
    35%
    Joined:
    Jun 13, 2011
    Messages:
    41
    Likes Received:
    0
    Seems to work. Thanks.
     
Loading...