301 Redirect of Old Domain to New in Cloudflare

301 Redirect of Old Domain to New in Cloudflare

If you're trying to direct an old domain in Cloudflare to a new domain, this short article will explain how to do so.


Don't Feel Like Reading? We Made a Video Explaining the Full Details of the Topic. Click Here to Scroll Down to The Video

Steps

    1. Login to Cloudflare
    2. Click on your domain
    3. Visit Rules -> Redirect Rules
    4. Click on Create Rule
    5. Name your rule "old to new"
    6. Select radio button "All incoming requests"
    7. Then... URL redirect equals Type = Dynamic and Expression = 

concat("https://newdomain.com",http.request.uri.path)

 

* replace newdomain.com with your new domain name

  1. Checkbox "Preserve query string"
  2. Status code = 301
  3. Click on deploy
  4. Test test test.

View Entire Topic Via Our Youtube Walkthrough:

Leave a comment

Please note, comments need to be approved before they are published.

Tags

Thank You For Reading Our Articles!

We're committed to delivering real answers, valuable insights, and efficient knowledge online. Join us by subscribing, sharing, and engaging with our community to make a difference!