Getting 'TOO MANY REDIRECTS ERROR' When going WP Admin in WordPress


1. This happened to me on two websites. I'm not yet sure of the problem, however, I did find a solution that seems to temp fix the issue.

Here is the scenario. Created a New install with Softaculous, then go to the website, it works! but when you try to go to wp-admin you get the 'TOO MANY REDIRECTS ERROR'

I tried several known corrections for 'TOO MANY REDIRECTS ERROR' but they didn't work until I stumbled on this code on Stackexchange.com

Try this code in the wp-config file 

if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on'; else $_SERVER['HTTPS']='off';


If you find anything else about this issue please append research to this document.


1A. FOUND THE PROBLEM! (5 MINUTES AFTER WRITING THE ABOVE) LOL

If using Cloudflare you need to set SSL/TLS to full, the two case websites were set to 'flexible'. After you make this change you will not need the code above!

Did you find this article useful?