Hosting website on DO but using shared hosting mail servers

April 14, 2015 2.4k views
Email LAMP Stack Ubuntu

I recently migrated my site from a shared hosting account on StableHost.com over to DO.

The file migration went smoothly (mostly), however, I have a question about the mail. With Stablehost, I managed everything through cpanel and configured my incoming and outgoing mail servers with Gmail based on the configuration info obtained from cpanel.

However, now that I've change my dns information to point to digitalocean servers, I've stopped receiving emails. I'm assuming there is something wrong that I have to change with the MX entries (on DO or on StableHost?)

Is it possible for me to keep using my old shared stablehost account just for the mail services (avoiding setting up my own mail servers on DO)? How do I configure this to fix my email?

Thank you!
Niket

2 comments
  • I guess you had your DNS setup on the shared hosting account. I haven't used DO yet, just thinking about it, but you are correct you will need to update your MX record. Since I have not spun up a droplet yet, I'm not sure if DO has DNS on there droplets or not, but even if they do, I would recommend you hosting your DNS on another site. If you have godaddy as your registrar you can host DNS there for free. Other registrars have similar offerings.

    Personally I have moved all my DNS services to DNSMadeEasy and have never looked back. They allow you to set up at least 8 vanity DNS servers located around the world. This will help yuor time to first byte and just make your domain look more professional. Speed is the main reason everyone is looking to SSD's any way, correct :-)

  • @bhopkins thanks for your reply!

    So I'm using Hover.com as my domain registrar and DO does have DNS configuration on the droplets.

    So my question is...do I point the DO DNS to my StabeHost shared mx records? Or the other way around. Definitely very much confused here :S

    ALternatively, I might just set up a Zoho mail since there seems to be a tutorial here at DO.

1 Answer

If you post your domain name, I can figure this out for you and give you exact steps. Let me a question.

Originally you had your NS records defined in your stable host account and pointing to their DNS servers, then when you started up this droplet, in the Hover.com account, you updated your name servers to point to digital ocean, correct?

Email was working as expected prior to this change, correct?

If this is accurate then you need to create MX records on your digital ocean host. Not sure if there is a control panel of if you will need to edit /etc/named.conf

Add two MX records pointing to
aspmx.l.google.com.
alt1.aspmx.l.google.com.

Leave the name portion blank and make one of them a 0 priority and one a 10

My guess is right now that if you pull up a command prompt on windows and do a nslookup

then set type=mx
Then your domain name and enter.

You will get a blank record as your MX records are defined on your old DNS and not present on your current DNS.

Post your domain name and the ip of one of your old DNS servers and I'll give you exact steps for what you need to do.

Have another answer? Share your knowledge.