Report this

What is the reason for this report?

How to setup ssl for Spaces CDN

Posted on March 7, 2026

I added a Digital Ocean Spaces and want to enable the cdn feature with an own domain. I added nameservers cdn.domainname.com and pointed them to Digital Ocean. I then enabled the cdn function in Spaces and get asked to add a subdomain. This is where I don’t know what to do. I tried assets.cdn.domainname.com, cdn.domainname.com but somehow the certificate isn’t valid



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, @arnevanhoorn

You don’t need to delegate a whole subdomain via nameservers — you just need a CNAME record pointing your custom subdomain to the Spaces CDN endpoint.

So if you want cdn.domainname.com, add a CNAME record at your DNS provider:

cdn.domainname.com → CNAME → <your-space-name>.fra1.cdn.digitaloceanspaces.com

(swap fra1 for whatever region your Space is in)

Then in the Spaces CDN settings, enter cdn.domainname.com as the custom subdomain. DO should automatically provision a Let’s Encrypt certificate for it once the CNAME resolves correctly.

If the cert isn’t valid or isn’t being issued, double check that the CNAME is actually propagated (dig cdn.domainname.com CNAME or use a tool like dnschecker.org). The cert provisioning won’t work if DO can’t verify the domain points to them.

Also make sure you’re not trying to use the root domain or a domain that already has an A record — CNAMEs can’t coexist with other record types on the same name.

The developer cloud

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

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Dark mode is coming soon.