Set MX to another server than digital ocean

July 1, 2014 2k 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?

5 Answers

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 (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?

  • Hi @craig1060352 , my DNS points to the CPanel Server.

    My Architecture:

    if not email:
    request ---> DNS --> CPanel server ----> DO droplet

    if email:
    request ----> DNS ---> CPanel server

Have another answer? Share your knowledge.