setting up email server to point to another host (Hostgator)

Posted February 28, 2017 10.5k views
UbuntuEmailDNSControl Panels

I was previously my site at hostgator and now moving to DO, thought now that I have to manage the email server. I wanted a way that only my website can be pointed to DO and the the email accounts still be managed by Hostgator (i.e. point email to hostgator). I am new to hostgator and VPS configuration in general.

The articles/tutorials I read none of them answered my above question mentioned

Any leads will highly welcome.

Thank you

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.

Submit an Answer
4 answers


If you plan on using DigitalOcean for your DNS, you’d simply setup your domain through the control panel (under Networking) and then modify your DNS zone accordingly.

For example:

A          @          DROPLET_IP
A          mail       HOSTGATOR_IP
CNAME      www        yourdomain.ext
CNAME      mail       mail.yourdomain.ext

MX         @          mail.yourdomain.ext          0

DROPLET_IP = The Public IPv4 IP of the Droplet you deploy.

HOSTGATOR_IP = The IPv4 IP of the web server your account resides on.

yourdomain.ext = Your actual domain name + extension.

The only thing you’d need to keep a look out for is when/if HostGator changes their IP. I’ve ran in to this a few times on setups with clients I’ve worked with in the past across a number of providers, so in the event they change the IP, you’ll need to change the IP listed in your DNS to match. It shouldn’t happen often, but moving accounts around is pretty normal, so it’s possible for it to happen a few times.

Point your A Records to your droplet and your MX records to your Hostgator inbox.

Greetings Team. I hope you can help me with my concern. My domain is being hosted here in Digital Ocean and my email service is being hosted by Hostgator. Until now my email is not working. everytime I send email to different email I keep on getting a bounce email. I am new to this and any help will be useful for me. More power to everyone.

Digital Ocean: