• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Help on changing primary domain

ZieglerM

Basic Pleskian
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
 
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?
 
Go yo Tools & Settings>Server settings and change hostname.domain1 to hostname.domain5 there.
 
Can you explain what you want to happen please? I don't quite understand. What email accounts and what settings?
 
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
 
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.
 
Back
Top