Question

@ is invalid hostname DO DNS Cname record.

I’m trying to direct my main site URL to a CDN where the files are stored. My backend is in a droplet so I’m using DO DNS. The problem is it doesn’t allow me to use @ as a hostname in the cname record to redirect my domain to the cdn, keeping my subdomain on DO.

Any ideas?


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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello, @camilamarencofotografia

A CNAME record defines an alias for an A record; it points one domain to another domain instead of to an IP address. When the associated A record’s IP address changes, the CNAME will follow to the new address.

On DigitalOcean, CNAME records have the following fields.

  • HOSTNAME, which should be set to the subdomain prefix for the new alias you want to create.
  • IS AN ALIAS OF, which should be set to the hostname where the alias should point. For the alias to work, the hostname must have an A record or be handled by a wildcard A record. This can be:
  • The apex domain (@). To map a apex domain, like example.com, enter the @ symbol.
  • A subdomain (e.g. site.example.com).

You can check our docs for managing DNS records. For CNAME follow the link below:

https://docs.digitalocean.com/products/networking/dns/how-to/manage-records/#cname-records

Hope that this helps! Regards, Alex