Url redirect to same /

Hi I’ve already checked:

a Cloudflare redirect post which it isn’t allowing me to share…

But I find it confusing, I basically want to make it so my traffic from (using example domains)
website1com is redirected to the same / version (don’t know the technical term) to website2com.

So for example
website1com/book auo redirects towebsite2com/book
And I want to do this for ALL traffic that goes to website1com

So any traffic going to it including any / existing pages goes to the same URL extension but with only the main domain that has changed. I apologize if this is confusing I don’t know the technical terms.

I removed the www and the .s in the domain examples because it wasn’t allowing me to post it


Thank you for asking.

Meaning, you want to achieve to follow the path, for example. siteA.com/something should redirect to siteB.com/something where something can be anything? :thinking:

Correct, yes.

Here is a great step-by-step tutorial how to do it with * (asterix, wildcard) symbol and matching the path with $1 symbol:

1 Like

Thanks for your reply and yes that’s exactly what I mean, so it will redirect to the new domain with anything after the / so following your example if someone typed

siteA .com/book they would be redirected to siteB .com/book.

Will following the steps in your tutorial achieve this?

Also I’m currently pointing my Cloudflare to the hosted website server, should I remove anything pointing to the hosted website now as I will be having the new domain doing that since that will be the actual domain being used for the website now?

1 Like

Thank you for feedback information and questions.

Yes, and each other path like /book2, /abcdef, etc.

Yes, the steps and the expected end result as described. Just make sure to put your domain name instead of example.com or pageA.com or pageB.com as used in the tutorial for easier understanding.

The above tutorial for Page Rules would work if the domain is using Cloudflare nameservers and if it’s proxied :orange: at the DNS tab of Cloudflare dashboard.

New domain doesn’t have to be on Cloudflare. However, it’s good practice to make it faster and secured if you have this option :wink:

Thanks again for the information I think there was some miss communication/understanding of my last question. Ill try to ask it in a different way.

My current domain that will soon be redirecting a new domain is pointing to a cloudways web server where the actual website is hosted.

Since I will be creating a new Cloudflare account for the new domain that will be pointing to the cloudways web server with the new account and domain, should I remove the “pointers” records pointing to the cloudways hosting server with my current which will soon be the old domain if that makes sense?

I followed the tutorial and it appears to be working thank you Im just still not sure about whether to change which IP I should make the old Cloudflare account with the domain that is redirecting point to, whether I should keep it to the server or the dummy ip.

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