Guides Guides 5 min read 946 words

Cloudflare HTTP to HTTPS Redirect: Setup and Checks

Set up a Cloudflare HTTP to HTTPS redirect with Always Use HTTPS. Check certificates, avoid redirect loops, and understand mixed-content fixes.

A Cloudflare HTTP to HTTPS redirect sends visitors who request an HTTP address to its HTTPS version. For a whole website, Cloudflare provides Always Use HTTPS. Before enabling it, check that HTTPS works for every affected hostname and that existing redirects will not send visitors back to HTTP.

The redirect and the encryption mode solve different problems. The redirect changes the visitor's destination; the SSL/TLS mode controls how Cloudflare connects to the origin. We explain both here so that turning on one switch does not conceal a broken or unencrypted origin connection.

Check the prerequisites before changing anything

The website hostname must be proxied through Cloudflare for Cloudflare to handle its HTTP requests. A DNS-only record points visitors toward the origin instead. If that distinction is unclear, start with our Cloudflare proxy setup guide before following the redirect instructions.

Cloudflare's HTTPS enforcement documentation requires an active edge certificate and an encryption mode other than Off. Visit the HTTPS version directly before forcing HTTP visitors onto it. Check the main hostname, any www version you use, and other hosts affected by the zone-wide setting.

Review redirects at the host, application, and Cloudflare. Do not leave one layer forcing HTTPS while another forces HTTP. Keep a note of the current settings so that you can undo the new change without guessing which previous configuration was working.

Enable Always Use HTTPS

  1. Sign in to the Cloudflare dashboard and select the correct website.
  2. Open the SSL/TLS Overview page. Confirm that the encryption mode is not Off; Cloudflare says the Always Use HTTPS option is not visible in that mode.
  3. Open Edge Certificates.
  4. Turn on Always Use HTTPS.
  5. Request an HTTP version of a real page and inspect the redirect destination. Then load that HTTPS page and confirm it works.

Always Use HTTPS applies across the application's hosts and subdomains handled by Cloudflare. If only part of the application supports HTTPS, Cloudflare recommends a selective Single Redirect instead. Do not enable a broad switch first and hope that unsupported hosts will be excluded automatically.

The old version of this article suggested a fixed waiting period based on DNS propagation. That is not a useful verification method for a redirect setting. Check the response itself. If it is wrong, investigate the request path, certificate, and configuration rather than waiting for an arbitrary countdown.

HTTP request redirected to HTTPS; mixed content and origin encryption require separate checks.
Conceptual illustration, not a dashboard screenshot or a configuration test. Based on Cloudflare documentation checked 13 November 2026. Source: https://developers.cloudflare.com/ssl/edge-certificates/additional-options/always-use-https/

Automatic HTTPS Rewrites is a separate feature

Always Use HTTPS redirects a page request. Automatic HTTPS Rewrites changes eligible HTTP resource URLs in page responses to HTTPS. Those tasks are related, but turning on resource rewriting is not what creates the whole-site redirect.

To enable the rewriting feature, stay on Edge Certificates and switch Automatic HTTPS Rewrites to On. Cloudflare checks whether resources can be served over HTTPS before rewriting them. Its documentation also describes limitations, including resources loaded through JavaScript or CSS.

Do not assume either switch fixes every mixed-content problem. Review images, stylesheets, scripts, embeds, and application-generated links. Correct remaining insecure URLs at their source where possible. A page that reaches an HTTPS address can still reference resources that fail to load securely.

Understand the two connection legs

There is a visitor-to-Cloudflare connection and a Cloudflare-to-origin connection. Cloudflare's troubleshooting guide explains that Flexible uses HTTP to the origin, whereas Full and Full (strict) use HTTPS to the origin. A successful browser redirect does not, by itself, demonstrate what happens on that second connection.

Do not switch modes blindly to silence an error. Full or higher requires a certificate configured at the origin; the appropriate setup must match the origin's capabilities and certificate configuration. If your hosting provider manages that part, ask it to confirm the origin configuration before changing the mode.

For a broader introduction to the service, read how to use Cloudflare. If your website does not use this proxy and needs an origin-level solution instead, our Apache HTTPS redirect guide covers that separate approach. Do not deploy both recipes without checking how their conditions interact.

Test for success and troubleshoot loops

Use a browser network inspector with caching disabled to request the HTTP address. Inspect the response and its Location destination, then follow the chain. Confirm that it ends at the intended HTTPS page rather than alternating between schemes or hostnames. Test an inner page as well as the homepage.

If you see ERR_TOO_MANY_REDIRECTS, inspect the full chain. Cloudflare documents a common conflict: Flexible sends HTTP to an origin that immediately redirects that request to HTTPS. It also documents the opposite conflict, where HTTPS connections reach an origin that redirects them back to HTTP.

Return to the setting you changed and disable Always Use HTTPS if necessary while correcting the conflict. Also review application redirects and other Cloudflare redirect rules. Undoing the last switch can restore access, but it is not a substitute for repairing the underlying certificate or origin configuration.

When working on a newly chosen domain, our domain registration lookup can help with registration context. It does not test TLS or prove a redirect works; use actual HTTP responses for that verification.

HTTPS redirect FAQ

Does the redirect fix mixed content?

No. It changes the page destination. Resource URLs still need HTTPS support, and Automatic HTTPS Rewrites has limits.

Should we enable this if one subdomain lacks HTTPS?

Not as a blanket solution. Cloudflare recommends selective redirects when only some application areas support HTTPS.

Does success in one browser prove the server redirects?

Not necessarily. Inspect the network response and redirect chain rather than relying only on the address bar.

Sources