Cloudflare for SaaS not work & customer's CNAME doesn't go to my workers domain

Problem: What I want to achieve

I have a few customers that I store and serve protected assets for. I want to store them in R2 and use Workers as my origin server to serve these files (stored in R2) over the users custom domain/hostname. I want to have a set of subdomains routed to a particular worker, which will look at the host header and decide who the customer is and which bucket/files to serve them. I want my customer to set a CNAME DNS record to point their subdomain to my own subdomain, which are already bound to the worker.

I’m reaching for Cloudflare for SaaS so I can offer them SSL and other benefits like DDoS for their domains.
I’ve enabled Cloudflare for SaaS, but it doesn’t seem to work. I set up the TXT record and have it marked active. I’ve followed docs instructions but couldn’t get it to work

Solution 1
I have a worker which I configured as a route worker, and have a customer’s subdomain point to a subdomain I expect to be intercepted by my Route worker. That doesn’t work, with or without Cloudflare for SaaS custom domain.

Solution 2
I used custom subdomains and removed route config for the worker. Still, customers subdomain point to my workers custom domain as CNAME record doesn’t work with and without adding the custom hostname to Cloudflare for SaaS SSL set up.

Question

  • I may not fully understand the benefit of Cloudflare for SaaS, but is it the right solution for what I want to achieve?
  • Can’t I point a different subdomain to the custom domain mapped to my Worker, irrespective of if I use Cloudflare for SaaS or not?
  • How do people already leverage Cloudflare for SaaS?

Did you configure a Worker route for your customer’s domain, or just for your own subdomain?

1 Like

Just for my own domain

I’ve sorted it out. I needed some DNS records. Thanks

1 Like

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