Move main domain of whm to a new server

samuelmf

Well-Known Member
May 22, 2006
126
6
168
Perú
Hi, currently on my server i have 2 accounts one for the main domain and other

I want to move the main domain of my server to a new server and leave the old server only with the second domain

Please help me providing me a precise steps that i need to take to perform this job.

Thanks
 

quietFinn

Well-Known Member
Feb 4, 2006
1,394
179
193
Finland
cPanel Access Level
Root Administrator
Hi, currently on my server i have 2 accounts one for the main domain and other

I want to move the main domain of my server to a new server and leave the old server only with the second domain

Please help me providing me a precise steps that i need to take to perform this job.
There is not such a thing as "main domain" in cPanel server.
Let's say that you have a server, and in the server you are hosting domain "MyDomain.ext", and that server's hostname is "server1.Mydomain.ext".
Is that what you mean?

You are free to move domain "Mydomain.ext" anywhere you want, as long as you make sure that "server1.Mydomain.ext" resolves to the correct IP address.
 
  • Like
Reactions: cPanelLauren

samuelmf

Well-Known Member
May 22, 2006
126
6
168
Perú
To clarify,

You have two accounts on the server or 1 account with an addon domain?
Two accounts on the same server so I purchased a new server with a new cPanel license to move the main domain under that domains all the services works to the new server.
I don't think that the situation will be so easy as "just move to the new server" what I need to do I think I must edit manually many files to make the second account on that server to make it the main account where all the services will run.
By example hosts file, zone files, network files.
Or there is a easy way to do with whm?
 

quietFinn

Well-Known Member
Feb 4, 2006
1,394
179
193
Finland
cPanel Access Level
Root Administrator
@samuelmf
as I stated previously there is no such a thing as "main account" in cPanel server.
Your server has a hostname and all the services are using it.
If you go to WHM->Networking Setup->Change Hostname you see:

It is important to choose a hostname that you will not be using for any account. You should choose something that will be socially acceptable, as it will appear in all mail headers. Your hostname must be a FQDN. In English, a hostname should consist of a name and a domain name. All valid hostnames should have 2 dots in them. Hostnames should never begin with “www”. Hostnames should also not begin with a digit, nor end with a hyphen (“-”).
The domain you are using for a server's hostname doesn't have to reside in that server.
 

samuelmf

Well-Known Member
May 22, 2006
126
6
168
Perú
So, the steps that i need to do are:
Old server
1.- Move the domain1 to new server
2.- Change the hostname of the old server to a new one
3.- Edit Nameservers zone files with the correct values
New server
1.- Set the correct nameserver according to the moved domain.

Datacenter:
1.- Ask to the techs to change the ip for the rdns of the old server hostname.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,273
313
Houston
So, the steps that i need to do are:
Old server
1.- Move the domain1 to new server
2.- Change the hostname of the old server to a new one
3.- Edit Nameservers zone files with the correct values
New server
1.- Set the correct nameserver according to the moved domain.

Datacenter:
1.- Ask to the techs to change the ip for the rdns of the old server hostname.
I suppose this would work but it might just be easier to do the following:
  • 1. Setup new server hostname/nameservers
    • (if you want to use a new hostname/nameservers here's your shot otherwise you'll need to change the hostname on the old server)
      • New hostname and NS will need time to propagate before you go live with this change
  • 2. Move domain to the new server
  • 3. Confirm domain works as intended on the new server
  • 4. ***If you did not choose new hostname/nameservers*** Add the nameservers to the new server and update the hostname
    • change the hostname on the old server
    • add nameservers to new server and point NS A records from old server to this one at both the registrar and on the old server

The documentation here goes over this - it odes include steps on how to retain the old IP address if you're performing an IP swap and how to add the server to the DNS Cluster. How to Move All cPanel Accounts from One Server to Another | cPanel & WHM Documentation