Report this

What is the reason for this report?

How do I point my root domain to a DO app through CNAME without losing my MX records?

Posted on February 19, 2021

I have recently tried to set up a DigitalOcean App Platform. It was indeed a pleasure to find the ease with which I can launch a basic site without setting up anything myself, but I am having problems with pointing my domain to the url generated for my app. I have added a CNAME pointing to it, but I cannot do that for the “@” class, ie. for the root domain without losing my MX records which point to Google. Please advise



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!

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.

CNAMEs aren’t valid at the root (sometimes call apex) of a domain. To use App Platform at the root of a domain you need to use a technique called CNAME Flattening (sometimes also called an “ANAME” or alias record). The easiest way to achieve this is let DigitalOcean manage your domain. App Platform will automatically configure CNAME flattening for any DigitalOcean managed domains you add to your app. CNAME flattening is supported by a number of other provides including Cloudflare, namecheap, and DNSimple.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.