Help with redirecting a website please

I have tried setting up a redirect via page rules a few different ways but it doesn’t work. Could you help me with what I might be doing wrong?

I am attaching a screenshot of the settings. Would appreciate any help. Thank You!

You should avoid Page Rules, and use instead the new Redirect Rules (beta), as they are more flexible and more precise.

What exactly are you trying to accomplish? Could you give examples of the end behavior you expect after a successful rule is implemented?

Thank you. I have a domain that i have had for a while. I want to redirect a new domain to this domain. That’s it.

So if someone types abc dot com, it should open xyz dot com

Assuming abc dot com is still under your control and has been added to Clouflare, you can create a Single Redirect of the Dynamic type for:

When incoming requests match...
Hostname equals abc dot com OR
Hostname equals www.abc dot com 

Then Redirect Dynamic with an expression:

concat("https://www.example.com", http.request.uri.path)

Where www.example.com is the target domain.


Here are the settings i have that are not working. Any ideas what might be going on?

It should work. Are both hostnames proxied (:orange:)? Do you have a regular Cloudflare setup, or is it a partner setup?

So, the one at the top (that i am trying to redirect) won’t be proxies, correct since there are no DNS settings?

The one i am redirecting to is NOT proxied. It connects to Adobe Portfolio and if i proxy it it stops working.

When you say a regular Cloudflare setup? Both these domains are owned and managed by Cloudflare.

You can only redirect if they are proxied.

Why not? You should add A records for them pointing to a resolvable IP address. The tutorial on Page Rule redirect from one domain to another has the following advice:

I would recommend creating an A record for the host, pointing to 192.0.2.1

The same applies to Redirect Rules (beta). Without a proxied A record, redirects won’t work.

The domain you’re redirecting to does not need to be proxied.

Thank you! thank you! thank you! That proxied A record on the first website did the trick.

2 Likes

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