Custom hostname not mapping to worker
Hi
I’m running into a Custom Domain issue with Workers.
I have a Worker (pages-lp) that dynamically serves landing pages for user-created subdomains. I’m using Cloudflare Custom Hostnames / Custom Domains for this.
My main domain is pages.io
A Worker is mapped to lp.pages.io
I’ve set up dynamic user domains via the Workers Domains API (example: mani.customer.com)
cname for mani.customer.com is configured to lp.pages.io and proxied through Cloudflare
The Worker checks KV_DOMAINS for the mapped domain and serves HTML accordingly
When I visit mani.customer.com, I consistently get a 522 Connection Timed Out error.
The Worker isn’t even hit (no logs in Observability)
The same Worker works fine when I add mani.customer.com directly as a route in wrangler.toml
❓My question:
Do I need a specific setting or plan to make dynamic custom domains work under Cloudflare for SaaS?
Also, do I need to disable DNSSEC or change anything in DNS to make the proxy connection succeed?
Is there a way to handle unlimited dynamic custom hostnames without having to predefine them in wrangler.toml routes?
Any insights or similar experiences would be super helpful 🙏
Thanks in advance!
0 Replies