Cloudflare setup 301 Redirect from domain / subdomain

Updated: 14th April 2024
Tags: cloudflare

If you need to redirect from one domain/subdomain to another domain subdomain, you need to:

  1. Make sure NS servers point to Cloudflare.
  2. Add/Change the record of the domain/subdomain that you want to redirect to something else. A record must have a value 192.0.2.1 (Cloudflare IP for docs) or any resolvable IP address.
  3. Create a redirect rule.