Skip to content

Fix WordPress Too Many Redirects After HTTPS

After moving WordPress to HTTPS, “Too many redirects” is often caused by a proxy or load balancer not passing HTTPS state correctly.

Fix

Add this to wp-config.php before “That's all, stop editing!”:

php
define('FORCE_SSL_ADMIN', true);

if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) &&
    strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) {
    $_SERVER['HTTPS'] = 'on';
}

Save, clear cache, and try again.

Released under internal 12SSL documentation guidelines.