While trying to log in to my website I noticed that Chrome is giving me the error message “ERR_TOO_MANY_REDIRECTS” preventing me from accessing the WordPress admin panel (/wp-login or /wp-admin). The website itself can still be reached, but certain posts now point to http instead of https. I haven’t made any changes to the link structure or any other settings recently.
Essentially, from what I can tell, the login page is the only page stuck in a redirect loop.
After an extensive Google search, I’ve now exhausted all possible solutions I can find without any success.
Here’s what I’ve tried so far:
* Clear browser cache and cookies, also tried to access the admin panel via multiple different browsers on multiple devices.
* Manually deactivate all plugins via FTP (renamed “plugins” folder within “wp-content” folder to “plugins_old”)
* Rename or delete .htaccess file
* Check “siteurl” and “homeurl” in “wp_options” in the database (same URL for both entries, e.g.: https://mydomain.com)
* Adding code to wp-config.php
if (strpos($_SERVER[‘HTTP_X_FORWARDED_PROTO’], ‘https’) !== false)
$_SERVER[‘HTTPS’]=’on’;
Didn’t help.
if (strpos($_SERVER[‘HTTP_X_FORWARDED_PROTO’], ‘https’) !== false)
$_SERVER[‘HTTPS’]=’on’;
else
$_SERVER[‘HTTPS’]=’off’;
Didn’t help.
if($_SERVER[‘PHP_SELF’]==”/index.php”)
{
define(‘WP_HOME’,’https://yourdomain.com’);
define(‘WP_SITEURL’,’https://yourdomain.com’);
}
else
{
define(‘WP_HOME’,’http://yourdomain.com’);
define(‘WP_SITEURL’,’http://yourdomain.com’);
}
Didn’t help.
Another useful bit of information is likely that I’m using Ezoic as my ad network and have integrated the website with them via nameserver integration. That worked fine until a few days ago. Prior to using Ezoic, I managed the SSL certificate for my website via my hosting provider. This is now done by Ezoic although I have no idea whether that could potentially be the issue.
Do you have any additional ideas for troubleshooting or what could be the root of the problem?
[ad_2]
Do you have cPanel? If so, under domains there is an option to force redirect to https. You don’t need that code in your wp-config file.
Sounds like Ezoic could be the issue. Why did you move the SSL to them?