Serving content through custom hostnames that are pointed to a Cloudflare Worker

Hi, I’m trying to follow this guide in order to set up custom hostnames with a CF Worker:

I’m running into the exact same problem as this issue I found on the forums in the past:

It seems like this was a bug that was fixed by the Cloudflare team in the past but I have the same setup as that person and I’m getting the same 522 error.

My setup:

  • worker with a worker route of* pointing to the worker.
  • I have set up as a fallback origin in Custom Hostnames.
  • I have a AAAA record for proxy with a content of 100:: on, like the Cloudflare document above describes
  • I set up a Cloudflare Custom Hostname for The certificate status and hostname status is Active.
  • On the customer DNS side, I have a CNAME record for www with a value of

I would assume that customer CNAME would mean any time someone accesses, the CNAME to would cause Cloudflare to route that to the worker.

curl -I returns a 522

curl -I returns a 200 and I see the request in Cloudflare

Does Cloudflare still support using a worker as the fallback origin for custom hostnames? Does this not work when trying to serve custom hostnames from ONLY I have other endpoints like and that I do not want to serve custom hostnames from. Do I need to use a different domain to serve custom hostnames from? For example, instead of