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!
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.
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.
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.