Proxied Routes and Worker

Hi,

I have a website, example.com, with its A records and canonical name configured in Cloudflare DNS. Here are the details:

  1. The 2 A for points to IP address 10.10.10.1 and 10.10.10.2 with proxying enabled.
  2. There is a canonical name record for mapped to external Domain name with proxying enabled.

I have created a Worker script for redirection: when https://example.com is accessed from the US, it should redirect to https:///test, and when accessed from outside the US, it should serve original URL. I have added routes for the Worker script as example.com/* and www.example.com/*.

The Worker dev URL works fine, but the production URL is not redirected as expected using the routes and Worker.

I have also tried with Rules. But it is not working. Even If I don’t enable any features when proxied is enabled still site is reaching.

Can someone please help

Regards
Keshav

Have you checked your Worker logs to see if it’s actually being triggered?

Hi,

Tried, no logs on worker getting triggered. I tried other features like transform rules and redirect rules, but site is not getting redirected as expected.

Regards

Keshav

This is most likely an indication that your proxied hostname points to a provider that uses Cloudflare. In that case, they control all the settings for that hostname. More information about that is here:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.