Reverse Proxy served Subdirectory, through Cloudflare - how to?

Hello there

We would like to transfer a new domain to Cloudflare. Although this is under a subdirectory which is served through reversed proxy. Is it possible to have that subdirectory go through Cloudflare and if so, how?

Thank you

Hi, @michalis.vranis,

I’m not quite sure which of these setups you’re trying to achieve (255.255.255.255 being your origin):

  1. example.com/subdirectory -> Cloudflare -> 255.255.255.255
  2. example.com -> Cloudflare -> 255.255.255.255/subdirectory
  3. example.com/subdirectory -> Cloudflare -> 255.255.255.255/subdirectory

If it’s neither, could you try elaborating?

Thank you Albert,

Well it’s example.com/sub right now and would like to have that be served through Cloudflare.

You cannot enable Cloudflare only for a subdirectory, unfortunately. May I ask why you’re only interested in proxying a subdirectory?

Well, as an agency we handle the local subdirectory of a global brand, hence we’re limited.

Thank you anyway!

Ahh, alright. Cloudflare (and every other CDN I know of) works by having you point a DNS record at their servers - URL paths have no effect on DNS. It’s possible to have different rules (caching, bot protection etc.) for each path once the entire domain is proxied, but that would of course require some effort :slightly_smiling_face:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.