Changed website Nameservers to Cloudflare and got the error message 'ERR_TOO_MANY_REDIRECTS'

I just changed my websites DNS to use cloudflares nameservers and the website immediately got the error message ERR_TOO_MANY_REDIRECTS

Things I’ve tried

  • In my cloudflare dashboard Your SSL/TLS encryption mode is Off
  • Turned off SSL/TLS Recommender
  • Turned off Automatic HTTPS Rewrites
  • Turned off TLS 1.3

The website is running on cPanel, and already had a valid LetsEncrpt certificate generated by cPanel

The site is www.sankala.co.uk

I ran the URL through a online redirect check tool here

https://www.redirect-checker.org/index.php

Here was the output

>>> https://www.sankala.co.uk

> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------

Status:	301 Moved Permanently
Code:	301
Date:	Fri, 16 Feb 2024 18:26:58 GMT
Connection:	close
Cache-Control:	max-age=3600
Expires:	Fri, 16 Feb 2024 19:26:58 GMT
Location:	http://www.sankala.co.uk/
Report-To:	{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=eQuO%2F%2F6RBG0lrE6OI0RJ3b3D0LIyXkyHRWYVPMKRF6yK6RxwGBDhPkurjYjuHIL%2FhbdWbY0J6pDJETyf7l560lJHc4fbfaUshtQRLT5FCQOBCZHnig1pYMC2gNwMchO5rOs9YA%3D%3D"}],"group":"cf-nel","max_age":604800}
NEL:	{"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Server:	cloudflare
CF-RAY:	8567d78b8e481b9f-FRA




>>> http://www.sankala.co.uk/

> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------

Status:	301 Moved Permanently
Code:	301
Date:	Fri, 16 Feb 2024 18:26:58 GMT
Content-Type:	text/html; charset=UTF-8
Connection:	close
Vary:	Accept-Encoding,Cookie
X-Redirect-By:	WordPress
Location:	https://www.sankala.co.uk/
X-Cache:	HIT
CF-Cache-Status:	DYNAMIC
Report-To:	{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=Z2Spn4ILieniuo2OwNPKGx6P9Pv7GpfaA9S1VArgsRIoxApsJESMDHAbrvn90xsiQAWsyEotaz%2FhZc0aUkR9vbkrGT6vYbp7Xvm%2BowS0dAlzmMoTN%2FqTOhsRGT9e75lqXGtPTg%3D%3D"}],"group":"cf-nel","max_age":604800}
NEL:	{"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Server:	cloudflare
CF-RAY:	8567d78baa3c2c2a-FRA




>>> https://www.sankala.co.uk/

> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------

Status:	301 Moved Permanently
Code:	301
Date:	Fri, 16 Feb 2024 18:26:58 GMT
Connection:	close
Cache-Control:	max-age=3600
Expires:	Fri, 16 Feb 2024 19:26:58 GMT
Location:	http://www.sankala.co.uk/
Report-To:	{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=5%2FCije8FNFULBEKzUwjFJDKkVhNLzNk78kNrSTh6dxlbBKNWBTuu%2BZjccDVF1R0%2B9UvoFyNglTMhn8TC8bzxj%2FPtJ01RZ6nV4kjdACnwlkUBMUyzMVBZ2B2RFLMHkFkdw3RfJA%3D%3D"}],"group":"cf-nel","max_age":604800}
NEL:	{"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Server:	cloudflare
CF-RAY:	8567d78c4fb72c7d-FRA




>>> http://www.sankala.co.uk/

> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------

Status:	301 Moved Permanently
Code:	301
Date:	Fri, 16 Feb 2024 18:26:58 GMT
Content-Type:	text/html; charset=UTF-8
Connection:	close
Vary:	Accept-Encoding,Cookie
X-Redirect-By:	WordPress
Location:	https://www.sankala.co.uk/
X-Cache:	HIT
CF-Cache-Status:	DYNAMIC
Report-To:	{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=WBkXSzwLxSnYuI251Jykyu439qRIuXAqxT6a1FHgMD7%2FnnUtNzIdkwnaDWuT0zfc4WKQ9BhmmOnpc1hjNvLP%2BXUJSkLMe5l5mylt%2F6n%2FktAitQI7Nj91Hgo56rvM4xtmN3Ltew%3D%3D"}],"group":"cf-nel","max_age":604800}
NEL:	{"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Server:	cloudflare
CF-RAY:	8567d78c68f3693d-FRA




>>> https://www.sankala.co.uk/

> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------

Status:	301 Moved Permanently
Code:	301
Date:	Fri, 16 Feb 2024 18:26:58 GMT
Connection:	close
Cache-Control:	max-age=3600
Expires:	Fri, 16 Feb 2024 19:26:58 GMT
Location:	http://www.sankala.co.uk/
Report-To:	{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=LU4dLwSX9r3HOYjJBC13QrDPZ4oN%2F%2FXrqbALrTzWy8KsQuhgq%2BxpmGsGt30n8n%2F27nF%2BbvKBw3C%2BH3HC9MzlzdYu9ROg17MOmAe0prQDRsRvhpq7e%2FKa5PIUAya%2BpQ6%2Bvpc%2F%2BQ%3D%3D"}],"group":"cf-nel","max_age":604800}
NEL:	{"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Server:	cloudflare
CF-RAY:	8567d78d2f2b03f0-FRA

I changed the settings: SSL/TLS encryption mode to Full (strict) and the site is back up any ideas why this happened?

The default “Flexible” mode makes connections from Cloudflare to your origin using HTTP only, even if the user makes an HTTPS connection to Cloudflare (which is why it shouldn’t be used). If your origin redirects HTTP requests to HTTPS, you end up in a loop where user requests HTTPS, Cloudflare connects over HTTP, your origin says “use HTTPS”, the user requests HTTPS, Cloudflare connects over HTTP, and so on until the browser gives up.

Always use “Full (strict)” anyway.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.