How to setup a 301/302 redirect

Hi,
Looking for any help to setup https to https 301/302 redirect using Cloudflare. Is this possible with Cloudflare using the free eff certificates? The redirect rules documentation isn’t very comprehensive. Since https to https redirect would require a website and tls certificate, here is what i was thinking:

enable Cloudflare proxy for the domain in question
Enable TLS/SSL using an eff certificate
Enable http to https redirect
Setup a rule to do a 301 or 302 redirect for everything https mydomain to https mynewdomain

any feedback or instructions anyone has to help with this would be greatly appreciated

Welcome to the Cloudflare Community. :logodrop:

There is a comprehensive Community Tutorial on the topic.

You can always use the new redirect rules instead of page rules, but the concept is essentially the same.

Thank you, this covers 301/302 redirect from http to https. Looking for a way to do https from old domain to https to new domain 301/302 redirect.

The problem is some of the sites are now being flagged in google search and with https only link. Clicking on the google link goes to the site via https. We will need some method of making sure we can terminate the existing https session and then do a redirect to the new domain.

Looking for 301/302 redirect help from one domain to another for HTTPS to HTTPS. Which is why i was thinking if we enable proxy for the domain, enable tls only, enable http to https redirect (for anyone still hitting the webpage via http). and then a rule that would redirect from old domain to new domain. Just not sure about the order of execution of the rules. Also hoping do do this without needing to host a website and buy my own certificate.

What if I told you that you can use the same redirect with different values and it will do the https://example.comhttps://example.net that you want? :astonished: