Cloudflare domain forwarding when switching domain name

Sam Domain & Email Solutions

Domain name providers like Godaddy allow you to easily forward your domains. However if you use cloudflare you can accomplish the same thing just with an extra step using page rules.

If you use the basic URL redirect for the whole domain like olddomain.com, then you lose anything else in the URL like the specific page a user was trying to visit such as olddomain.com/about-us

So if you set up the page rule pattern:

olddomain.com

And set it to forward to:

newdomain.com

Then if someone entered:

olddomain.com/about-us

They would be redirected to:

newdomain.com

Instead of:

newdomain.com/about-us

Here is the page rule pattern to use in Cloudflare so that the information after the .com is kept:

Set the forwarding to www and add /* after the domain name:

olddomain.com/*

Then add /$1 to the forwarded URL:

newdomain.com/$1

Save the rule. Now if someone visits:

olddomain.com/about-us

They will be redirected to:

newdomain.com/about-us

This will help you keep your customers happy, help with SEO and make the domain change seamless.