Hello all,
My setup:
a. Two domains abc.com and xyz.com, both set up in Cloudflare (orange cloud on).
b. subdomain sub.xyz.com, with a Workers Site (running off the *.xyz.com route)
c. xyz.com has an A record that points to 192.0.2.1(ie nowhere, since I’m interested only in running a worker off the subdomain for now.)
What I want :
I’m attempting to cname sub.abc.com to point to sub.xyz.com, such that the Workers Site at sub.xyz.com loads when I visit sub.abc.com.
What happens:
- When I access sub.xyz.com from a browser window, the Workers site loads fine.
- When I try to load sub.abc.com (which is cnamed to sub.xyz.com), the Workers site does not load, and it attempts to contact the origin server 192.0.2.1 (which fails).
My question :
1.Is there a way to achieve what I want (as described above) by staying within the Cloudflare infrastructure and not having to configure an origin server?
2. Even if I configure a proper webserver at the origin, how should it ideally respond to a request, such that the worker is invoked?
Thanks in advance for your time.