Point subdomain in CloudFlare to Digital Ocean droplet

I would like to have SSL (https) in my droplet and I understand this is not possible without using a subdomain / domain pointing to the droplet IP.

I have a domain using Cloudflare and I would like to create a subdomain pointing to my Digital Ocean droplet. (using

When I do so without using the Cloudflare “proxied” option, it all works well:

A ------ test ------ DROPLET_IP — DNS ONLY (not proxied)

However, when I use the orange cloud icon (proxied) then it won’t work.

Why is that?

Also, I noticed there’s a “Networking” tab in Digital Ocean where we can add a domain. Do I need to do anything there in this case ? Or should I manage everything through CloudFlare?

I’m not used to deal with these things and I get a bit lost in here :)

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi there @mrstevejobs,

If your domain name uses Cloudflare’s Nameservers, you do not have to add your domain name under the Network section in DigitalOcean, as it would not have any effect. Your domain name would use only the DNS zone that your Nameservers are pointing to.

Regarding your subdomain name, yes if you set the A record of your subdomain name to point to your Droplet without Cloudflare proxy, then you will basically be able to use Let’s Encrypt and issue an SSL for your Droplet.

If you enable the Proxy setting in Cloudflare, what this essentially does is to change your A record to a Cloudflare IP address and then in the background Cloudflare would proxy the traffic to your Droplet’s IP address, but your subdomain name A record would be pointed to a Cloudflare IP and Let’s Encrypt would not work. Though if you keep the Proxy setting, you should be able to use an SSL provided by Cloudflare.

Hope that this helps! Let me know if you have any questions. Regards, Bobby

I have the same problem. After i change the cloudflare to full SSL, the site works properly.