Question

Custom Domains for Node App Deployment without Changing Nameservers

My client has their domain hosted on Google Domains along with their Google Workspace/Gmail MX records. I’d really like to keep everything there so nothing gets screwed up. I also noticed that I couldn’t add SPF records to Digital Ocean. So, I really need a way to add an A record along with a CNAME record if I need to Google Domains that point to my DigitalOcean-hosted Node app. (This is the method I’m used to.) All the app/custom domain section gives me is a CNAME record. I tried making a droplet to get an IP address but that didn’t really help either. Any help is appreciated!


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.

alexdo
Site Moderator
Site Moderator badge
November 20, 2022

Hello @topherknoll

If you do not want to change the nameservers you can use a CNAME record as described in our tutorial here:

https://docs.digitalocean.com/products/app-platform/how-to/manage-domains/#option-2-using-a-cname-pointer

As mentioned:

"You can also add a CNAME record to your domain. If your DNS provider is not DigitalOcean, reference your DNS provider’s documentation to see how to do this.

Use the “copy” button to copy the ondigitalocean.app alias, and paste it into the CNAME record on your DNS provider so that it points your custom domain to your App Platform app. When this is complete on your DNS provider, click the Add Domain button.

You can also add apex wildcard domains. App Platform validates the wildcard domain and issues certificates using TXT records."

The CNAME and the SPF records need to be added with Google since the domain name is using their nameservers.

Regards

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up