---
title: "Redirecting URL using cloudflare redirect rules"
description: "Redirecting url using cloudflar redirect rules"
canonical_url: "https://www.bigbinary.com/blog/redirecting-url-using-cloudflare"
markdown_url: "https://www.bigbinary.com/blog/redirecting-url-using-cloudflare.md"
---

# Redirecting URL using cloudflare redirect rules

Redirecting url using cloudflar redirect rules

- Author: Neeraj Singh
- Published: March 14, 2023
- Categories: Misc

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](https://neeto.com/neetoinvoice).

All this time, the AceInvoice website was not redirecting to NeetoInvoice. Today
we did that using [Cloudflare](https://cloudflare.com). The URL forwarding or
redirecting with
[page rule](https://developers.cloudflare.com/support/page-rules/configuring-url-forwarding-or-redirects-with-page-rules/)
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](https://www.bigbinary.com/blog/images/images_used_in_blog/2023/redirecting-url-using-cloudflare/www-version.png)

### Handling no www version

![No WWW version](https://www.bigbinary.com/blog/images/images_used_in_blog/2023/redirecting-url-using-cloudflare/no-www-version.png)

<iframe
  width="560"
  height="315"
  src="https://www.youtube.com/embed/R6-qnYN6PUs"
  title="YouTube video player"
  frameborder="0"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
  allowfullscreen
></iframe>

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.

## Links

- [Human page](https://www.bigbinary.com/blog/redirecting-url-using-cloudflare)
