How to setup redirect from old domain to new domain with cloudflare

If you have recently changed your domain name for your license and want to make sure that any traffic going to any page on your old domain name ends up in the exact same page in your new domain follow these steps:

NOTE: the Kleq support tean CANNOT help you troubleshoot your own Cloudflare account. The steps below are for information purposes. If you require more assistance please contact cloudflare, the kleq support team is NOT trained on the below and CANNOT help you.

  • Sign up to Cloudflare: https://www.cloudflare.com/
  • Once your account has been created add your OLD domain to your cloudflare account
  • Under Websites click on Add New Website button
  • Enter your OLD domain name in input and click continue
  • Select the FREE plan and click continue
  • The domain will be added to your cloudflare and they will ask you to change the Nameserver of your domain to point to your cloudflare account. Contact the domain registrar where you purchased your domain if you need help on how to update your name servers
  • Once the name server of the domain are pointing to your cloudflare account you can manage your DNS records on Cloudflare AND you can also add rules. That is what we need to do to redirect traffic from OLD domain to the NEW domain
  • On left sidebard click on Rules > Page Rules
  • On the Page rule page click on Create Page Rule
  • In the url field enter: www.OLDDomain.com/*
  • NOTE: Change OLDDomain.com with your old domain name and if you were using a subdomain other than www then also changed that. For example if my old domain was www.surf.com then I would enter www.surf.com/* in the url field. If my domain was members.surf.com then I would enter members.surf.com/* in the url field
  • In the settings dropdown select “Forwarding Url”
  • In Select status code dropdown select “301 – Permanent redirect”
  • In the destination URL enter https://www.NEWdomain.com/$1
  • NOTE: Change NEWdomain.com with your New domain name and if you were using a subdomain other than www then also changed that. For example if my neq domain is www.golf.com then I would enter https://www.golf.com/$1 in the url field. If my domain is members.golf.com then I would enter https://members.golf.com/$1 in the url field
  • Click on Save and deploy Button
  • Make sure the page rule is enabled and showing a green checkmark
  • You are done, now any traffic going to the old domain will land in the new domain. In the example above if someone was trying to go to www.surf.com/abc then they will land on https://www.golf.com/abc