r/CloudFlare: How to set up URL redirect to other page?

r/CloudFlare: How to set up URL redirect to other page?
💡
This article archives a conversation, which took place in a subreddit post (original source linked below) and to which I contributed a solution or answer (with the u/MasterofSynapse handle), in a Q&A format.

Original Reddit post: https://www.reddit.com/r/CloudFlare/comments/zwl2c8/how_to_set_up_url_redirect_to_other_page/

Question

I have a WordPress website with the URL "https://hackettlaiuiux.wordpress.com" and also I use cloudflare to manage my main domain "hackett.com".
What I want to achieve is when people type "hackett.com" I want to make it redirect to my WordPress page.

I have followed some of the tutorials online but end up it is still not working, I have added 2 A records and pointed to a dummy IP( I dun know what that for but most of the tutorials tell me to do so). And I also created a page rule for URL redirection.

Are there any things I'm missing??

r/CloudFlare - How to set up URL redirect to other page?

DNS Setting Page


r/CloudFlare - How to set up URL redirect to other page?

Page Rules

I found my setting sometimes work but sometimes the browser will keep loading and show 522 connection timed out at the end.

I tried to visit the WordPress page directly and proved that it can be loaded pretty normal so it doesn't seem to be a WP's issue?

Answer

I wrote one of the tutorials on Cloudflare Redirects (this one).

I used the new Dynamic Redirects rather than the Page Rules since Forwarding URL will be deprecated soon.

I also explained the reason for the dummy IP.

If my way with the Dynamic Redirects also doesn't work for you, we have to check other settings in your domain zone.

Comment 1 on Answer

OMG, as a noob like me, your tutorial is very helpful and detailed!!!
Learn something about DNS as well~~
it seems like I can visit my page by hackettlai.com right now!

Thx!!!

My response to comment 1

I am glad that you liked the guide :)

The config also tests consistently now with tools like this: https://httpstatus.io/