Hello.
My question is how to create a CNAME Record for the root domain “example.com”.
I’ve already looked at this tutorial here: https://www.digitalocean.com/docs/networking/dns/how-to/manage-records/
They wrote that I should use the “@” sign. Unfortunately when I try the “@” sign in the Hostname field I get the error: “Invalid Hostname”.
I wanna create the following alias:
example.com is an alias of foo.whatever.com
Thanks for the help !
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!
Hi @timoDjatomika,
Did you try putting example.com in instead of the @ sign?
I hope this helps! Bud Manz
Hey, @timoDjatomika
Could you please let me know if you want to set example.com as alias of foo.example.com or the other way around?
According to this blog post: https://www.freecodecamp.org/news/why-cant-a-domain-s-root-be-a-cname-8cbab38e5f5c/
I shouldn’t use the CNAME for the root domain. Some DNS Providers implemented a workaround (e.g. Cloudflare) so thats the reason why it worked for my other domain (using Cloudfront to host a website and Cloudflare as my DNS Provider).
I think digitalocean decided not to implement such a workaround because of reasons that I don’t know (maybe they wanna stick to a standard???)
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.