I have a worker running at
abc.site.workers.dev I’d like to be triggered by typing
www.example.com on my browser.
However, www.example.com is NOT managed by Cloudflare whatsoever, rather its DNS are still managed by my registrar for the moment.
So far I have naively set up a CNAME record in my registrar like that
CNAME www.example.com in abc.site.workers.dev
But for some reasons I randomly hit 522 and 1016 errors (don’t know why I don’t always get the same error btw). After some researches, I found that the
Host header needs to be the same as my worker’s URL.
As far as I understand, this might be some security measure and I can get it somewhat, however, is there any way to whitelist Host domains with a
* rule (or even one by one) somewhere and assume this responsibility myself ? Or are workers strictly available for domains managed through Cloudflare ? In fact, I have some domains that I cannot move out of their actual DNS providers but I would benefit from CF workers…
Thanks for your lights on this
Your last point is correct. Workers are available only to domains managed by Cloudflare (or in a Partner setup with a CNAME record). You can still call the URL though regardless of domain as far as I know.
Enterprise plans ?
BTW sorry but, could you elaborate what is a
Partner setup who should I talk to for that ?
Finally, I can confirm
abc.site.workers.dev is callable without setting any domain on Cloudflare, only the mapping from
abc.site.workers.dev seems restricted.
I have never personally done anything with a Cloudflare Partner, so not much I can help there, but I know that some of them do what you can do with a Business or Enterprise plan: a CNAME setup.
This setup allows DNS to be handled externally with a single subdomain on Cloudflare.
That is on purpose. It would only accept requests for itself, not additional domains… they need to be on Cloudflare and have that Worker on them.
Thank you for the precision @matteo very helpful