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!
Accepted Answer
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 like dig
or nslookup
.
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!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.