Redirecting an URL to another URL from the same domain doesn't work

I’m trying to redirect ** to$2 (which would redirect for example to, if I understood the doc about page rules correctly).

My website ( is deployed to a cloudflare worker. According to, I’ve setup the following DNS AAAA records:

  • to 100::, proxy status to proxied (orange cloud)
  • www to 100::, proxy status to proxied (orange cloud)

And I have the following page rules:

I tried adding page rules, such as ** Forwarding URL (Status Code: 302 - Temporary Redirect, Url:$2), but it doesn’t work.

Why doesn’t it work? How can I troubleshoot it? And Is implementing the redirect in the website code the only solution?

That should work. And you can get by with just one rule. Match* (leave off the HTTP/S part and it will match both).

Can you post a screenshot of your Page Rules?

Can you also confirm that on the bottom of your DNS page that Kolton and Tess are your name servers?

Here is the screenshot of my Page Rules:

And yes, I confirm that Kolton and Tess are my NS (set by default by cloudflare)

Ok. I’m stumped. Hopefully some staff from #JanJam will drop in within the hour to check this.

1 Like

@jpaul.wenger it seems like you are missing a forward slash / in your first pagerule to match the ** since the match is required for the /en and/or everything afterwards


Thanks @tobi. But I can’t even get the 2nd or 3rd Page Rule to trigger.

How’s your app routing work either regarding the Cloudflare page rules?
Are you having only HTTP, and when using Cloudflare you have HTTPS?
Is your app configured to use www sub-domain or not?

I have HTTPS with a cloudflare SSL certificate.
My domain has 2 subdomains (which have CNAME to somewhere else, such as a domain hosted in AWS).

I’m afraid I don’t understand your first question “How’s your app routing work either regarding the Cloudflare page rules?”


I think it’s time to open a ticket. After you open the ticket, be sure to post the ticket number here to push it along.

To contact Cloudflare Customer Support, login & go to Cloudflare | Web Performance & Security and select get more help. If you receive an automatic response that does not help you, please reply and indicate you need more help.

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