I’m trying to figure out the best way to have multiple external sub-domains bind or invoke a worker.
For example, these sub-domains (below) should all somehow invoke the same worker.
main.app.com (internal, I can add it to Cloudflare and them assign a worker) my.client1.com (external, can’t add it to Cloudflare) our.client2.com (external, can’t add it to Cloudflare) us.client3.com (external, can’t add it to Cloudflare)
How can I map them all via DNS or HTTP redirection in the simplest way possible, so that they all can invoke the same worker? Ideally, I just want to have a worker script, and avoid any other code or configuration elsewhere.
Hope it makes sense. I’ll appreciate your suggestions for a solution or workaround.
Unfortunately, external sub-domains may or may not have HTTP redirection capability in their registrar/DNS control panel, so we can only work with standard DNS records like A or CNAME. I can have them point it to another service (one that’s serverless and no-code/less-code, but where?), and then auto-redirect to the Cloudflare worker.