Report this

What is the reason for this report?

@ is invalid hostname DO DNS Cname record.

Posted on April 2, 2021

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?



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.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.