- Advertisement -
29 C
Lagos
Advertisement
Home Guide How to Setup 301 Redirect Using...

How to Setup 301 Redirect Using Cloudflare?

- Advertisement -

Recently made some re-branding with one of our old blog, very popular and has been online for 6+ years, I made the redirect using Namecheap DNS server (those using Namecheap should be familiar with this) but it did not work for me and majority of the world, then I moved the DNS to DNSMADEEASY infrastructure but then a new issue arise which is SSL error, which is not a good sign as it could damaged the reputation of the domain.

So during my research I found some tutorial on how to use Cloudflare to 301 redirect and forward the old domain to the new one with no SSL issues, but the tutorial did not work so with the help of the Cloudflare community I was able to get it working.

How to redirect domain using Cloudflare?

- Advertisement -

So, let’s get started with the steps on how to use Cloudflare network for domain forwarding…

Step 1

First you will need to add your domain that you want to redirect to Cloudflare. Simply signup for a free account, then add your domain and proceed to the next step.

301 Redirect Cloudflare

Step 2

Here you will select the FREE plan and then continue to the next step.

cloudflare plan

Step 3

By default the scan will show you the records of your current domain. You can simply delete everything and simply leave an A name record for both the www version and your primary domain. Replace your IP with this one 192.0.2.1 (This is a dummy IP leads nowhere, so don’t worry). Below is a screenshot of our my settings looks like.

301 Redirect Cloudflare

Step 4

Advertisement

Next step is to update the nameserver for the domain you wish to redirect, for me its healthable.net or healthable.org. I have made the changes in my Namecheap account.

301 Redirect Cloudflare

Step 5

Under the Crypto menu, select “Flexible” SSL. You will need this to ensure that redirects over HTTPS also work.

301 Redirect Cloudflare

This enables a universal SSL certificate on both *.domain.com and domain.com. This uses SNI and works on all major browsers… (looking at you explorer ? ).

Step 6

Under the Page Rules menu click on “Create Page Rule.”

301 Redirect Cloudflare

Step 7

Here is where the magic happens, so make the following changes..

You will then want to enter the following pattern:

*yourOLDdomain.com/*

Advertisement

Select “Forwarding URL” and “301 – Permanent Redirect” for the settings, and input the following rule:

https://yourNEWdomain.com/$2

The /$2 enables the wildcard part to function. Then click on “Save and Deploy.”  Below is a screenshot of what was done, just follow the steps outlined.

301 Redirect Cloudflare

The single rule above makes the following work:

  • http://healthable.org/ 301 redirects to https://healthtian.com
  • https://www.healthable.org/ 301 redirects to https://healthtian.com
  • http://www.healthable.org/* 301 redirects to https://healthtian.com/*
  • https://healthable.org/* 301 redirects to https://healthtian.com/*

To see if its working you can use redirect tracker or redirectcheck.com

Read more about Cloudflare page rules. And that is it! You can now ditch the hosting plan on your old domain and your wildcard 301 redirects will now be in place forever, pointing to your new domain. If you have any issues concerning this tutorial simple comment below or post in the cloudflare forum.

- Advertisement -
- Advertisement -

Trending Now

Infinix Hot 6 – Features, Specifications and Price

The Infinix Hot 6 is a toned down version of the Infinix Hot 6 Pro and it is the third member of the Hot...
- Advertisement -

Startimes Subscription Prices, Packages and Channels List in 2020

StarTimes Nigeria is one of the popular cable TV providers in Nigeria. This service is a subsidiary of a Chinese based company called Startimes...

GB WhatsApp Pro, OG WhatsApp Pro V8.10 (GB OG Replacements) Latest Version

Good day peeps, the latest GBWhatsApp is here... and it is called the GB WhatsApp ProRemember earlier, GB Mods the maker of GB WhatsApp...

GB WhatsApp, WhatsApp Plus and OG WhatsApp Tips and Tricks

Checkout the new GB WhatsApp Tutorial.Hello, welcome to WhatsApp Plus, OG WhatsApp and GB WhatsApp tips and tricks. For the sake of this article,...

Best Low Size PC Action Games For Your Old PC/Laptop With Low Specs

Gaming time is one our favorite time and nothing beats the ability to play high-quality games on our PCs but like some of our...

10 Best Places to Download Bollywood Movies

Do you spend hours watching Bollywood movies as I do? Have you been in search of the perfect sites to download the best Hindi...

DStv Channels List, Packages and Prices in 2020

Thousands of people in Nigeria have put their trust in DStv to provide them with the very best of television shows and programs.DStv (Digital...

How to Fix Home Key, Recent Key and Notification Bar Not Working?

There is a bug in the Android OS that dates back as far as the Lollipop Version and it is one of the most...

5 Best Under 15,000 Naira Smartphones in Nigeria

Smartphones are currently like the way of life today, and everybody needs one of them devices. The need to stay up to par with...

How to Download Tiktok Video Without Watermark on iOS & Android

It’s no longer news that the younger generation is into social media with the likes of Facebook, Twitter, Instagram, Vine, etc.But with the exit...

WhatsApp Plus, GB WhatsApp and OG WhatsApp Tips and Trick for 2020

Official Plus, the makers of WhatsApp Plus, GB WhatsApp (not the one by GB Mods that was shut down) and OG WhatsApp released a...
- Advertisement -

Related Posts

How to Fix USB OTG Related Issues on Android

With the great pace in which technology is advancing, it has brought in a great innovation into the smartphone industry, allowing it to analyze and...

How to Partition USB Drive on Windows 10?

Universal Serial Bus (USB) as it is well known, comes in different shapes and sizes, and apart from a pen drive that sticks in...

How to Link Up Your Android Smartphone With Windows 10?

Did you know that you can link up your Android smartphone with Windows 10 to create an amazing experience between the two devices? Once...

Best Supplies to Spice Up Your Office

Just because you have to go to work every day doesn’t mean you shouldn’t have fun with it. For many of us who do...

How to Stop Chrome From Draining the Battery on iPhone and iPad?

I don’t want to pass out any negative energy, but you should know I have a love for Chrome for iOS, but Apple's draconian...
- Advertisement -

LEAVE A REPLY

Please enter your comment!
Please enter your name here