Question

Set MX to another server than digital ocean

Posted July 1, 2014 4.9k views

I have a client that have a managed host with cpanel. Now he wants to migrate his web application from his managed host to DO; but he wishes to maintain the managed host in order to receive emails.

I thought that passing the DNS to DO and setting the MX in DO would do the trick, but that didn’t happened.

Can i set MX record to another server ip?

If so, how?
if not, what are my options?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

5 answers

Yes.
Where will your nameservers be, pointed at DO’s hosted dns, a dropplet running a dns server, or a cpanel/other web host/dns provider?

Right now i’m pointing to the CPANEL and the CPANEL points to a droplet.
The idea was to “redirect” every request to DO, except email.

I figured out.
For posterity, in case someone needs:

  1. In CPANEL/host i changed the A record to point to my droplet
  2. changed the mail CNAME record, first changing it to a type A record and then setting the ip with the one for my CPANEL/host
  3. then i set the mx to mail.mydomain.com. (don’t forget the final dot) with priority 0 (can be from 0 to 65,535; lower number means higher priority)

@josecostamartins I am actually facing the same issue. Did you end up changing your name servers to the Digital Ocean, or leaving them as the CPANEL?

Submit an Answer