How do you set up a simple redirect of a domain in CloudFlare?

After Google sold Google Domains (RIP) to Squarespace, most of the domain names we manage at Kimbley IT moved to CloudFlare as they offered the closest feature set to Google Domains.

Deploying our first redirect using Cloudflare involved more than we had experienced before. To be honest, the documentation provided by CloudFlare was very poor and left out the following critical information needed to deploy a redirect successfully.

With Google Domains, you entered the domain name you wanted to redirect to, and that was it, but with CloudFlare, you need to do the following:

First, you must create two A records in the domain DNS.

  • Name: @ Content: 192.0.2.1

  • Name: www Content: 192.0.2.1

These two records you have created must be set to be proxied.

Next, go to the Rules > Redirect Rules in the sidebar navigation.

  • Click Create rule.

  • Give the rule a name such as "Redirect to [destination domain]".

  • Select "All incoming requests".

  • The type should be set to Static.

  • In the URL box, enter the full URL, such as http://thedomainname.com

  • The status code should be set to 301.

  • Do not tick the Preserve query string box.

  • Leave the "Place at" box as Last.

  • Click Deploy.

You have now set up a domain redirect in CloudFlare.

 
James Kimbley
I am the founder of Kimbley IT.
www.kimbley.com
Previous
Previous

How to move files and folders between Shared Drives

Next
Next

Use Google Calendar to get quick insights into how you spend your time.