I use do spaces on my site www.example.com without a subdomain. The setup looks like this:


When uploading images everything works fine and images url looks like

Now I found out that you can use subdomain on your space. I configured everything by creating cname on Cloudflare that points to the origin endpoint, installed the certificates from Cloudflare to DO and the subdomain endpoint was set like images.example.com

My question is how do I configure DO spaces to use this subdomain endpoint instead of the origin one? So I can be able to upload images to images.example.com instead of uploading to bucketname.fra1.digitaloceanspaces.com


edited by bobbyiliev

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.

1 answer

Hi there @Jack9,

I believe that you will still have to use the https://fra1.digitaloceanspaces.com as the endpoint when uploading files, however, your images will be accessible via your subdomain name as well.

What you need to do is configure your subdomain name as the CDN endpoint as described here:



Submit an Answer