Pages rules and Redirect rules does not work

Hello

I need to forward an URL to another one, like for instance https://xyz.domain.com that redirects to https://facebook.com/abc

First I’ve created a Page Rule, but does not work (of course replaced values in the screenshot below with anonym values)

Then tried the Redirect Rules feature, but does not work neither

I even tried a Redirect Rule with a very wide incoming request match, like when “continent = EU” (since I’m in the EU), but it still does not trigger…

Can you help?

Thanks !

Without the real domain and real rules, it is going to be difficult for anyone to offer specific assistance.

I advise that you drop the Page Rule since they are pending deprecation and I don’t see any value investing any further time into them.

If you look at your Redirect Rule screenshot, you can see that not only have you added an unnecessary additional match criteria, you have also ignored the example that shows what content to use in that type of match.

Without the details, the best I can recommend is that you consult the Redirect Rules (beta) Cheat Sheet and make sure that any domains you plan to redirect are set to :orange: Proxied.

2 Likes

Thanks !

Yes I’ve tried Page Rule since Redirect Rules was not working.
And I’ve added a second matching criteria with a OR operator, to try to make it work, but still does not work.
Yes my domain is Proxied
What I want to achieve here is https://subdomain.domain.com (domain.com is managed by Cloudflare) redirected to https://othersite.com/page (outside of Cloudflaire)
But my subdomain does not really exist in Cloudflare. I mean I have no CNAME for it since I don’t know what to put in it. I was thinking that creating a redirect rule will create a CNAME to a kind of internal Cloudflare redirector. But it seems not.

To me it seems that since the subdomain does not exist as a CNAME, the brower simply does not resolve anything.

You definitely will not be using a CNAME. You are trying to create a redirect on a host with no origin. My preferred approach to that is to create only a AAAA record with the address set to 100::

Make sure it is proxied and it will be usable in your redirect rule.

2 Likes

Thanks again !

In the meantime when told me it should be Proxied, I’ve just tried to add a CNAME for mysubdomain that points to @ (root)

And now the Redirect Rule “Hostname starts with mysubdomain” is working !

What does the AAAA set to 100:: do? Is it a kind of wildcard to get all subdomains processed by Cloudflare without having to create a CNAME?

It is definitely not a wildcard. AAAA records are for IPv6 addresses. 100:: is assigned as the discard prefix which means that it goes nowhere. It just serves as a placeholder so that you can proxy that record. I prefer it to a proxied CNAME because it leaves no room for confusion about its purpose.

2 Likes