Subject: Workers not applied
I've just added a Worker on the Cloudflare Dashboard for my website: it works in the debugger but doesn't work when I query the site. Why is that? Is there anything to activate or anything I could check?
Hi there,
Thank you for reaching out!
The behavior you’re seeing is common when a Worker works in the debugger but not on the live site. Workers in Cloudflare have to be deployed and attached to the correct route or hostname to take effect on live traffic. In the debugger, the Worker runs in isolation for testing purposes, which is why it works there regardless of route configuration. On the live site, the Worker only executes when a request matches the route pattern you assigned.
Here are a few things you can check:
example.com/*, it won’t trigger on www.example.com unless that route is also defined.Once the routes are correctly configured, your Worker should execute on all matching requests automatically.
Let me know if you need any help afterwards please,
Best regards,
Lejla Vejzović | Cloudflare Support
To answer this, I considered how Cloudflare Workers operate in the debugger versus live traffic. I referenced Cloudflare Workers documentation to ensure correct deployment practices and routing rules. The approach is to verify route configuration, deployment status, and hostname matches to ensure the Worker runs as intended. This explanation helps the customer troubleshoot while understanding the difference between testing in the debugger and live traffic.