Question

Redirecting mail from digitalocean IP to cpanel

I have been having an issue for the last few days. My mail is setup on cpanel. I have an CNAME record ‘mail.example.com’ pointing to my domain ‘example.com’. After changing my domain’s A record to point to digitalocean i stop receiving mail but reverting back to cpanel ip the mail starts coming in. I tried setting up a subdomain ‘mx1.example.com’ and created an MX record on digitalocean pointing to the subdomain but the mail still doesn’t come. Would anyone have a solution to this?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello, @mymbugua

You can simply point the MX record to the IP of the server where your emails are hosted. You can also point the MX to a subdomain like you did if the subdomain is pointed to the correct IP address as well.

Keep in mind that DNS changes might take up t 24 hours or even more due to DNS cache from the ISPs. I believe that you should start receiving your emails soon.

You can check the DNS using this tool here:

https://www.digitalocean.com/community/tools/dns

Hope that this helps! Regards, Alex