Enable CloudFlare for subdomain, keep main domain at Netlify

I have a static site at example.com, and it’s hosted on Netlify. I also have a dynamic website at sub.example.com hosted on DigitalOcean.

Is it possible to enable CloudFlare just for sub.example.com?

1 Like

No, it’s not possible because Cloudflare requires you to set up their NS for the entire domain (which includes any subdomains of course).

Do you think migrating the main domain (example.com) to https://pages.cloudflare.com/ (when it becomes available) would make it possible to use Cloudflare for the subdomain (hosted at DigitalOcean)?

This is not correct.

You can move just your DNS to Cloudflare, and keep your hosting for each hostname wherever you like. If your move your DNS, you can use other features of Cloudflare by setting the relevant hostname to :orange:.

If you do not want to change your DNS, you can setup the sub domain with a CNAME setup, and use Cloudflare just for that one subdomain.

(You cannot do a CNAME setup for example.com, but subdomain.example.com is fine)


Learning something new everyday :smiley:

1 Like

This topic was automatically closed after 31 days. New replies are no longer allowed.