I’m building a SaaS app with a Cloudflare Worker and would like my customers to be able to point their domains to the worker via a CNAME record. Steps taken so far:
- Launched a worker and assigned the
worker.mydomain.com route to it on Cloudflare
worker.mydomain.com as a fallback origin under SSL/TLS / Custom Hostnames on Cloudflare
- Added a
worker AAAA 100:: proxied record under DNS on Cloudflare
- Added a custom hostname
customerdomain.com via the API on Cloudflare. Both the SSL/TLS certificate status and the Hostname status are currently Active.
- Added a
@ CNAME worker.mydomain.com record for
customerdomain.com on a respective third-party domain service.
The request to
customerdomain.com results in Error 522. However, the request to
worker.mydomain.com results in the worker serving the expected content.
I have followed these guides:
Yet, to no avail. I’m in dire need of help.
Can you please share here the syntax you used for the Worker route?
Did you use wildcards as mentioned in the documentation?
I tried both
*.mydomain.com/*. Neither of them worked. The dashboard won’t let me specify
*/* as the route and says that is is invalid and should contain
This indeed should work.
Could you please open a support ticket and let us know the ticket number here?
We’ll investigate further then.
Please provide all details in the ticket, with the real hostnames.
I have opened a support ticket #2311247, but it got closed automatically because I’m on a free tier, even though I subscribed to paid custom hostnames.
Please, reopen the ticket and investigate it or tell me if I need to subscribe to a Pro plan to be able to access support. However, paying $20 for the sole purpose of submitting a support ticket for something that does not work as described in the docs seems unfair.
Currently this issue is a blocker, as the rest of the MVP is ready to be deployed to production any time soon. At this point I’m either hoping to get this solved or will be forced to switch to AWS CloudFront or Fly.io. I, however, would rather prefer to stick with Cloudflare as I genuinely favour it over everyone else.
That’s not necessary. The community can escalate issues such as this to support, and Nic is already looking at this one for you.
Thank you, guys. I sincerely hope that you will help me resolve this.
We have received word that the issue described here should be fixed.
SaaS hostname with Workers as origin should work.
Are you able to confirm this, @c2u5hed?
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.