Cloudflare Docs
SSL/TLS
SSL/TLS
Visit SSL/TLS on GitHub
Set theme to dark (⇧+D)

ERR_TOO_MANY_REDIRECTS

After you add a new domain to Cloudflare, your visitors' browsers might display ERR_TOO_MANY_REDIRECTS or The page isn’t redirecting properly errors.

This error occurs when visitors get stuck in a redirect loop.

flowchart LR accTitle: Redirect loops illustration A[Request for http://example.com] --> B[Redirect to https://example.com] B --> C[Redirect to http://example.com] C --> B subgraph Redirect Loop B C end

This error is commonly caused by:


​​ Encryption mode misconfigurations

Your domain’s SSL/TLS Encryption mode controls how Cloudflare connects to your origin server and how SSL certificates presented by your origin will be validated.

This setting can cause redirect loops when the value you set in Cloudflare conflicts with the settings at your origin web server.

​​ Flexible encryption mode

If your domain’s encryption mode is set to Flexible, Cloudflare sends unencrypted requests to your origin server over HTTP.

Redirect loops will occur if your origin server automatically redirects all HTTP requests to HTTPS.

flowchart TD accTitle: Redirect loops illustration for Flexible mode A[Request for https://example.com] --> B[Encryption mode redirects to http://example.com] B --> C[Origin server redirects to https://example.com] C --> B subgraph Cloudflare B end subgraph Origin server C end

To solve this issue, either remove HTTPS redirects from your origin server or update your SSL/TLS Encryption Mode to be Full or higher (requires an SSL certificate configured at your origin server).

​​ Full or Full (strict) encryption mode

If your domain’s encryption mode is set to Full or Full (strict), Cloudflare sends encrypted requests to your origin server over HTTPS.

Redirect loops will occur if your origin server automatically redirects all HTTPS requests to HTTP.

flowchart TD accTitle: Redirect loops illustration for Full or Full (strict) mode A[Request for http://example.com] --> B[Encryption mode redirects to https://example.com] B --> C[Origin server redirects to http://example.com] C --> B subgraph Cloudflare B end subgraph Origin server C end

To solve this issue, remove HTTP redirects from your origin server.


​​ Edge certificate settings

​​ Always use HTTPS

If you have Always Use HTTPS enabled for your domain, Cloudflare redirects all http requests to https for all subdomains and hosts in your application.

Redirect loops will occur if your origin server automatically redirects all HTTPS requests to HTTP.

flowchart TD accTitle: Redirect loops illustration for Always Use HTTPS A[Request for http://example.com] --> B[Always Use HTTPS redirects to https://example.com] B --> C[Origin server redirects to http://example.com] C --> B subgraph Cloudflare B end subgraph Origin server C end

To solve this issue, remove HTTPS redirects from your origin server or disable Always Use HTTPS.

​​ HSTS

If you have HTTP Strict Transport Security (HSTS) enabled for your domain, Cloudflare directs compliant web browsers to transform http links to https links.

Redirect loops will occur if your origin server automatically redirects all HTTPS requests to HTTP or if you have your domain’s encryption mode set to Off.

flowchart TD accTitle: Redirect loops illustration for HTTP Strict Transport Security A[Request for https://example.com] --> B[Encryption mode redirects to http://example.com] B --> C[HSTS redirects to https://example.com] C --> B C --> D[Origin server redirects to http://example.com] D --> C subgraph Cloudflare B C end subgraph Origin server D end

To solve this issue, remove HTTPS redirects from your origin server and make sure your domain’s encryption mode is Flexible or higher.

Alternatively, disable HTTP Strict Transport Security (HSTS).


​​ Redirect rules

Redirect loops can also occur if you have conflicting URL redirects.

flowchart TD accTitle: Redirect loops illustration for redirect rules A[Request for https://a.example.com] --> B[Redirect to http://b.example.com] B --> C[Redirect to https://a.example.com] C --> B subgraph Cloudflare B C end

To solve this issue, review your various URL forwarding rules and Page Rules to make sure no rules are not in conflict with each other.