Question

DigitalOcean spaces with Cloudflare

Hello! I found a similar issue in the following thread: https://www.digitalocean.com/community/questions/cdn-subdomin-url-and-cloudflare but it doesn’t work for me.

I did the following:

  • Created a new space on DO, chose to work with CDN (and received an address, for example https://<bucket>.ams3.cdn.digitaloceanspaces.com
  • Generated origin Server cert for domain.com on Cloudflare
  • Adding new CNAME record on Cloudflare with name: static and content: https://<bucket>.ams3.cdn.digitaloceanspaces.com
  • I set up my own subdomain in the DigitalOcean space and specified the following: the name of the certificate is static, uploaded the certificate and private key from the certificate of the original Cloudflare server, specified the link static.domain.com.
  • After that, when I try to open static.domain.com in browser, I am getting the following error: Invalid SSL certificate Error code 526

Who had a similar problem?


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.

Bobby Iliev
Site Moderator
Site Moderator badge
April 21, 2023

Hi there,

When you added your custom SSL certificate, did you also add the Cloudflare CA certificate as well?

If not, you can get it from here and re-add the certificate in your DigitalOcean acount and include the CA certificate:

https://developers.cloudflare.com/ssl/origin-configuration/origin-ca

I’ve just tested this with with the CA certificate added and it seems to be working as expected.

Let me know how it goes!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel