Page Rule Redirect to External URL

I have a page rule for a URL that I want to redirect to an external URL. I have a QR code that points to this URL, and by using a page rule I’m hoping to be able to update what that QR connects to over time.

Here’s the record I have in place, but it does not seem to be working.

Forwarding URL (Status Code: 301 - Permanent Redirect, Url:

When I attempt to visit I get a 404 page could not be found from my wordpress website. Is there something I’m missing to make this work? I already have this record set as the #1 position of the page rules.

Could you share a screenshot of your Page Rule? :thinking:
Is it the only Page Rule you’re using or you have multiple of them?

Seems like you’ve Paused Cloudflare for your zone? :thinking:
Did you made some changes recently or were testing some things?
Is your hostname proxied and :orange: at Cloudflare dashboard?

cURL returns HTTP header nginx for servername instead of Cloudflare, therefrom the DIG returns the origin IP instead of Cloudflare’s proxied IP. If not :orange: , Page Rules won’t apply and work as expected.

You should probably make this a temporary redirect incase you make mistakes, browsers remember this and it’s hard to clear.


Good to know! Thank you!

Yeah it’s a safe policy, nothing worse when you have to change link or made a mistake.

Seems like you’ve Paused Cloudflare for your zone? :thinking:

If I have, I was not aware of it - I’m not sure what you’re referring to by “zone”.

Well, I’ve been trying to make it work - so in that respect yes, I’ve been changing things - but all of them basically this same config.

No, does it need to be?

Sorry, you’re way over my head with this - I think you’re indicating why it’s not working, but I’m not sure what to do to fix it.

If you want Cloudflare services like Page Rules to apply and work, short answer - yes. The hostname (DNS record) for your zone have to be proxied :orange:.

Page Rules require a proxied DNS record for your page rule to work. Page Rules will not apply to hostnames that do not exist in DNS or are not being directed to Cloudflare.

More about it at the article below:

So I just need to change the proxy status of these records to “Proxied” like this:

And I should be all set? If so, thank you so much!

1 Like

Yes. Now it does work as expected, in my Web browser the URL redirects me to the stated “scroll-menu.jpg” resource :slight_smile:

From cURL for double-checking:

$ curl -I
HTTP/2 302
date: Tue, 30 Jan 2024 20:01:23 GMT

Happy to assist you! :wink:

1 Like

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