Hello,
I already found some related information, but it don’t seem up to date.
I have a domain example.com and manage the DNS in digital ocean. ns1.digitalocean.com, ns2.digitalocean.com, ns3.digitalocean.com are configured to example.com. I also set up a CNAME for subdomain test.example.com for a web application.
Now I need to point the root domain, example.com, to a static website. I created a new app in digital ocean, connected to gitlab repository, and got the xyz-123.ondigitalocean.com domain. Now I thought I can just add another CNAME for example.com -> xyz-123.ondigitalocean.com. But the DNS Controlpanel won’t let me do this.
Can you please help me how to connect the root domain example.com to xyz-123.ondigitalocean.com?
Thanks in advance
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.
Heya,
For pointing your root domain to an App Platform app, you cannot use a CNAME record. Instead, you need to use an ALIAS or ANAME record. However, DigitalOcean’s DNS service does not support ALIAS/ANAME records currently.
As a workaround, you can create an A record pointing your root domain (example.com) to the IP address of the app
xyz-123.ondigitalocean.com
. Keep in mind that this method isn’t ideal since IP addresses might change. To obtain the IP address, you can use a tool likedig
ornslookup
.Another option is to use a third-party DNS provider that supports ALIAS or ANAME records to manage your domain’s DNS.
For more information on managing DigitalOcean DNS, please visit our DNS documentation.
https://docs.digitalocean.com/products/app-platform/how-to/manage-domains/
Hope that this helps!