Are you using FREE SSL from Cloudflare? and still having an issue too many redirects in your WordPress website? Then here is the quick solution for Cloudflare SSL Showing too many redirects.
You just need to add the below code to your wordpress website and its a go.
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) { $_SERVER['HTTPS']='on'; }
Add the above code below the wp_debug line in your wp-config.php file in your wordpress root directory.
Close it and reload the site after clearing the cache and the site will be working like a charm.

CodexJunction Editorial Team creates practical and easy-to-understand technology content covering programming, web development, AI, APIs, cybersecurity, WordPress, hosting, technical SEO, and related technology topics.
The team focuses on clear explanations, useful examples, reliable research, and keeping technical information relevant and up to date.
