webzod
account

Redirect HTTP to HTTPS on Cloudflare

headers.redirect.no_redirect · effort: minutes

Why it matters

Visitors who type the bare domain or follow an old link land on the unencrypted site and stay there. A permanent redirect sends every http request to the same page over https.

Staged change. Do this in stages and check each one before the next, so a mistake does not break your site or your mail.

The fix

  1. Stage 1: open https://example.com/ and the important pages and fix any warnings. Set SSL/TLS, Overview to Full (strict) if the origin has a certificate.
  2. Stage 2: open SSL/TLS, Edge Certificates and turn on Always Use HTTPS. It redirects every http request on proxied hosts to https.
  3. If the encryption mode is Flexible, remove any http to https redirect on the origin; together with Flexible it causes a redirect loop.

The examples use example.com. Replace it with your own domain.

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.