Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
added 124 characters in body
Source Link
HBruijn
  • 85.2k
  • 24
  • 147
  • 224

Cloudflare Flexible SSL: secure connection between your visitor and CloudFlare, but no secure connection between CloudFlare and your web server. You don't need to have an SSL certificate on your web server, but your visitors still see the site as being HTTPS enabled. Source

Because you redirect to HTTPS from your server, rather than with a Cloudflare page rule, even HTTPS requests by the client will still always trigger the redirect rule.

1. Client ---> HTTP ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 2. Client ---> HTTPS ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 3. Client ---> HTTPS ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 

Cloudflare doesn't talk HTTPS to your webserver and that creates an Infinite Redirect loop.

To resolve that you'll need to remove the redirect from your .htaccess file and set up a Cloudflare page rule instead.

Cloudflare Flexible SSL: secure connection between your visitor and CloudFlare, but no secure connection between CloudFlare and your web server. You don't need to have an SSL certificate on your web server, but your visitors still see the site as being HTTPS enabled. Source

Because you redirect to HTTPS from your server, rather than with a Cloudflare page rule, even HTTPS requests by the client will still always trigger the redirect rule.

1. Client ---> HTTP ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 2. Client ---> HTTPS ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 3. Client ---> HTTPS ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 

Cloudflare doesn't talk HTTPS to your webserver and that creates an Infinite Redirect loop.

Cloudflare Flexible SSL: secure connection between your visitor and CloudFlare, but no secure connection between CloudFlare and your web server. You don't need to have an SSL certificate on your web server, but your visitors still see the site as being HTTPS enabled. Source

Because you redirect to HTTPS from your server, rather than with a Cloudflare page rule, even HTTPS requests by the client will still always trigger the redirect rule.

1. Client ---> HTTP ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 2. Client ---> HTTPS ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 3. Client ---> HTTPS ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 

Cloudflare doesn't talk HTTPS to your webserver and that creates an Infinite Redirect loop.

To resolve that you'll need to remove the redirect from your .htaccess file and set up a Cloudflare page rule instead.

added 212 characters in body
Source Link
HBruijn
  • 85.2k
  • 24
  • 147
  • 224

You have enabled Cloudfare CDN as can be inferred from the header:

Server: cloudflare-nginx ... 

Cloudflare Flexible SSL: secure connection between your visitor and CloudFlare, but no secure connection between CloudFlare and your web server. You don't need to have an SSL certificate on your web server, but your visitors still see the site as being HTTPS enabled. Source

A fairly common oversight is that you have configured Clouflare to use plain http to connect to your server. Because you redirect to HTTPS from your server, rather than with a Cloudflare page rule, even HTTPS requests by the client will still always trigger the redirect rule.

1. Client ---> HTTP ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 2. Client ---> HTTPS ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 3. Client ---> HTTPS ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 

Cloudflare doesn't talk HTTPS to your webserver and that creates an Infinite redirectRedirect loop.

You have enabled Cloudfare CDN as can be inferred from the header:

Server: cloudflare-nginx ... 

A fairly common oversight is that you have configured Clouflare to use plain http to connect to your server. Because you redirect to HTTPS from your server, rather than with a Cloudflare page rule, even HTTPS requests by the client will still always trigger the redirect rule.

1. Client ---> HTTP ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 2. Client ---> HTTPS ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 3. Client ---> HTTPS ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 

Infinite redirect loop.

Cloudflare Flexible SSL: secure connection between your visitor and CloudFlare, but no secure connection between CloudFlare and your web server. You don't need to have an SSL certificate on your web server, but your visitors still see the site as being HTTPS enabled. Source

Because you redirect to HTTPS from your server, rather than with a Cloudflare page rule, even HTTPS requests by the client will still always trigger the redirect rule.

1. Client ---> HTTP ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 2. Client ---> HTTPS ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 3. Client ---> HTTPS ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 

Cloudflare doesn't talk HTTPS to your webserver and that creates an Infinite Redirect loop.

Source Link
HBruijn
  • 85.2k
  • 24
  • 147
  • 224

You have enabled Cloudfare CDN as can be inferred from the header:

Server: cloudflare-nginx ... 

A fairly common oversight is that you have configured Clouflare to use plain http to connect to your server. Because you redirect to HTTPS from your server, rather than with a Cloudflare page rule, even HTTPS requests by the client will still always trigger the redirect rule.

1. Client ---> HTTP ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 2. Client ---> HTTPS ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 3. Client ---> HTTPS ----> Cloudflare CDN ----> HTTP ----> Your server | <------- Response: Redirect to HTTPS <- 

Infinite redirect loop.