Steps to Setup DNS while Website and Emails are hosted by two different companies

Martyn Coomber

Registered
Dec 11, 2017
4
0
1
Ivory Coast
cPanel Access Level
Website Owner
Hi All,
I am new to cPanel and its entire setup.
Now that I have that out of the way, let me explain my problem.

A work of a company in this case we call Company X. Company X has a domain. xxxxxxxx.org
Company X originally had its emails and website hosted by Company A. After two or more years Company X decided to change host from Company A to Company B. During this period of changing service providers, A maintained some of the files of X and B did not get all the files.
B is presently hosting the website and emails for X but the website is presently down as not all files were transferred thus leaving B with limited files to work with. Users in X configured their mail files to get mails from B and in the process lost mail files from A. A claims to still have mail files for X. Now X wants to do one of the following.
  1. Get a hosting platform with Company C and then get the mail files from A and B and merge. Is this advisable?
  2. Get a hosting from platform with C and transfer files for Website and at the same time maintain emails at B. So C will now host the website while B will host the emails. Is this possible? If so, whats the steps of having the DNS in B point to C for the website and at the same time B continues hosting the emails
  3. Since A has the larger mail files, transfer mail files from B to A and the send website files to C and have C host website while A hosts emails.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello,

1. For email, you can update the MX records for the domain name (at the server that handles it's DNS records) to point to the remote mail server if all email activity is handled on that remote server:

MX Entry - Documentation - cPanel Documentation

Keep in mind that all email activity (email account creation, webmail, message delivery) would then be handled on the server that hosts the email, as there's no synchronization functionality available. As far as moving all of the emails from the other servers to the new one, imapsync is useful for that purpose:

HOW TO: Using IMAPSync to Transfer mail from server to server

2. For website files, simply ensure the domain name and it's subdomains all resolve to the IP address of the server that's going to host it's website files. If that server uses cPanel, you can copy over those files using "WHM >> Transfer Tool". Otherwise, you'd need to manually setup the domain name on that remote server and upload the files to it manually using a protocol such as FTP.

Thank you.
 

Martyn Coomber

Registered
Dec 11, 2017
4
0
1
Ivory Coast
cPanel Access Level
Website Owner
Thanks for this. As I said, I'm new to cPanel. So even after reading the attached links, I still have no clue as to how I go about resolving the IP Address to the website files. Please assist.
Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello,

First, you'd need to determine where the domain name's DNS is hosted. For instance, at the domain registrar for this domain name, do you use your own custom name servers, or the registrar's name servers?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
As at the moment the Domains name DNS is hosted with Company B.
In this case, you'd ensure the DNS records are setup on the "Company B" server. Does it use cPanel? If so, you can use "cPanel >> Zone Editor" or "WHM >> Edit DNS Zone" on this server to add or modify DNS records for the domain name.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello,

Ideally, you should simply update the name servers for this domain name at it's registrar so it points to "Server C" since that's where all of the website content is hosted. This way, you don't have to manually adjust all of the DNS zone entries. Once you do this, you'd simply access cPanel for the domain name on "Server C" and update the "MX records" and "mail" record for the domain name so they point to "Server A".

Thank you.