I’d like my customers to be able to “white label” my SaaS app - in other words, point their domains to a Cloudflare worker via a CNAME record.
Cloudflare For SaaS products should provide for this, but when I access the worker via a C NAME rather than directly, I get a 522 error.
Steps taken so far
1.) Launched a worker (“myco-cnames”) and assigned it the route “customer” under my main company domain. When I access this directly, it is providing a response correctly.
2.) Added this as the fallback origin under SSL/TLS / Custom Hostnames on Cloudflare.
3.) Added a custom hostname matching the customer’s whitelabel sudomain on Cloudflare. Both the SSL/TLS certificate status and the Hostname status are currently Active.
4.) Added a CNAME at the customer’s registrar to point to the customer route under my main domain.
Expected behaviour
When navigating to the customer’s subdomain, I expect to see the C NAME work, and display the content from the worker.
Actual behaviour
I see a “Connection timed out” error, 522 code.
Additional info
1.) I saw another customer had the same issue (ID 329219). I didn’t add any AAA records, as don’t understand if that is relevant.
2.) The worker works fine when accessed directly, i.e. not via a C NAME
3.) The worker is configured with the simplest example from Cloudflare possible and should return a simple HTML file.
4.) Myco doesn’t exist; this is in place of my company’s name. I can’t add links due to privileges.
Filed as support ticket with actual domain info: 2938629.