Worker routing
Hey everyone, I need some help with DNS and Cloudflare Workers.
I set up a CNAME like this:
And I created a Worker route:
Everything works fine, the subdomains are being routed to the Worker.
The problem is with the hierarchy: I have routes that should not go to the Worker, like api. and dash., which are correctly defined in DNS and working as expected.
The issue is with the DNS for R2 Storage, which was automatically created by Cloudflare. In this case, I’m using dns.mydomain.com.
This subdomain is being routed to the Worker instead of R2 — it’s only happening with this one.
Has anyone encountered this before or can shed some light on it?
1 Reply
If you're doing *. you're explicitly saying to route all subdomains so this is expected
You can either specify specific subdomains you want to go to the Worker
or you can exclude some routes if you go to zone -> Worker Routes -> Add route with Worker "none"