Redirecting URL using cloudflare redirect rules

Neeraj Singh avatar

Neeraj Singh

March 14, 2023

At BigBinary, we had been using AceInvoice as our time tracking and invoicing tool for years. Last year, we migrated all the data to NeetoInvoice.

All this time, the AceInvoice website was not redirecting to NeetoInvoice. Today we did that using Cloudflare. The URL forwarding or redirecting with page rule is a neat feature of Cloudflare. Below are the screenshots of the steps taken to redirect the URLs. More details are covered in the video.

Handling www version

WWW version

Handling no www version

No WWW version

We didn't mention it in the video, but it's worth knowing that we need to have a CNAME record for a subdomain that needs forwarding. For examples let's say that we need to forward all traffic from https://videos.bigbinary.com to https://bigbinary.com/video. We can't add a page rule for this directly. For we need to add a DNS entry for subdomain videos and this entry must have cloudflare "proxy" checked so that you see Proxied next to it. If you see "DNS only" then that means Cloudflare will not be able to do any forwarding.

Follow @bigbinary on X. Check out our full blog archive.