Report this

What is the reason for this report?

How to Set up a Custom Domain on Cloudflare for Digitalocean Spaces + CDN

Posted on April 16, 2023

I was following the documentation about how to add a custom subdomain as a CDN endpoint to DigitalOcean Spaces: docs.digitalocean.com/products/spaces/how-to/customize-cdn-endpoint/#add-a-custom-subdomain

The steps I took following this documentation were as follows:

  1. I created a new DigitalOcean Spaces Bucket with enabled CDN.
  2. I created a new SSL origin certificate in my Cloudflare settings for the subdomain that I want to use: cdn.domain.com
  3. I added the new subdomain to my Spaces Bucket filling in the certificate information from Cloudflare.
  4. I added a CNAME DNS record to Cloudflare to point the subdomain to the default CDN endpoint: cdn.domain.com > spacesbucket.cdn.digitaloceanspaces.com
  5. I uploaded a file to the Spaces Bucket to test the configuration.

The result:

I can access the uploaded file via the default CDN endpoint, but I cannot do so via the subdomain endpoint.

I receive either a Cloudflare Error 1014: CNAME Cross-User Banned message or a cdn.notionunpacked.com’s DNS address could not be found. Diagnosing the problem. error message.

I tried turning the Cloudflare proxy status for the CNAME record off and on. It doesn’t work with either of these settings.



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 @consistentbenny

Please remember that DNS changes might take time to propagate, so allow some time after making adjustments for changes to be reflected globally. Usually this will happen straight away but it might take up to 24 hours for the DNS to update properly.

You can check that the DNS is working properly using our DNS lookup tool

https://www.digitalocean.com/community/tools/dns

Regards

hi @consistentbenny ,

Cloudflare Origin Certificates are only valid for encryption between Cloudflare and your origin server.

I was told that DigitalOcean Spaces can’t automatically renew SSL certs unless you use DigitalOcean for the root nameservers. It sounded like it isn’t really feasible to use the Spaces product with Cloudflare, since Cloudflare requires you to use their DNS. I can’t stop using Cloudflare, so it’s a bit limiting.

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.