How do I use a custom domain with Digital Ocean spaces while still using Cloudflare for DNS management?

Posted January 7, 2020 4.3k views

Hey all, I’d like to add a custom domain to my Digital Ocean space while still using Cloudflare for DNS management, and more importantly, DDOS protection.

How would I go about doing this? I see that there’s an upload your own cert option but I’m unsure as to how to acquire one (as I don’t have access to the space’s command line).

edited by alexdo

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.

Submit an Answer
1 answer

Hello, @the1sword

If you want to manage your DNS settings from Cloudflare you just need to set the CNAME record from your CloudFlare DNS Control Panel and you’re good to go.

Securing your Space is flexible and easy. You can now upload a certificate for your own subdomain or use a free Let’s Encrypt cert that is simple to provision in just a few clicks, right from the Control Panel.

Let me know if you have any questions.


  • Hi,

    Where can I find that IP? I’ve looked through the documentation & the digital ocean panel, am I missing something?


    • Hello, @the1sword

      The IP address of your droplet is visible from your control panel and also you can check/view it via ssh as well.

      You can check it using commands like:


      Look for the eth0 and the IP will be listed at the inet row

      hostname --all-ip-addresses
      ip addr

      Hope this helps!


      • Hi!

        That’s good to keep in mind, but I’m trying to get spaces to work, not a droplet. Unless there’s some way to access a spaces command line?


        • Hello, @the1sword

          I would recommend you to check this blog post for using the DigitalOcean spaces with custom subdomains:

          Let me know if you have any questions.


        • This comment from Helmut might help you. I’ve tried it and it works.

          If you are trying to point from Cloudflare, you will need to install a custom Cert generated by >>>cloudflare<<<.
          To to this, go to Cloudflare domain panel > SSL/TLS > Origin Server > Create Certificate. Then, fill the field with only your subdomain (tip: create a subdomain that is not covered by wildcard such as "”).
          It will give you a Cert and a private key. Copy the content of these fields into the Digitalocean space under the CDN > Bring your own certificate options.

          If it is not working, try to create the record ( before the certificate.“

          I took that comment from that blog post linked by alexdo above.