WordPress too Many Redirects

Running into Wordpress SSL redirect issues? Get it fixed fast, as it can impact your SEO!
Wordpress SSL redirect

Running SSL is a requirement these days. From showing trust to your website visitors to helping with SEO, you would be frowned upon to run a site without SSL. It’s not too difficult to get SSL enabled, but the headaches come when you try to enable it, and issues arise. Here I will cover a few scenarios that I have run into in the past with WordPress too many redirects, and how I got around fixing them. These issues were mostly around SSL redirects.

What is the ET::ERR_CERT_INVALID Error?

This happens often when you forget the www domain in the SSL request. For example, you setup SSL for https://askshank.com but your site is https://www.askshank.com. Another scenario is if your browser is not trusting or accepting of the domain authority. Lastly, and also very common – the certificate expired.

How Do You Handle the WordPress Too Many Redirects?

For those running Cpanel, I have seen this type of issue from time to time. The site loads then stops and you get an error regarding too many redirects. The way this was fixed was enter two sets of codes. The first code is the following, in the wp-config.php file which is in the root directory of your WordPress install. If you don’t have direct access to the server, you can install a plugin such as a file manager.

define('FORCE_SSL_ADMIN', true);

If that alone does not work, then add the following code as well

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

These two code pieces combined helped the SSL redirect issue immediately.

How Do You Redirect Everything in WordPress to SSL?

Sometimes, enabling SSL alone is not enough. Certain images may be called via http vs https. Edit your .htaccess file with the following code below. If you feel like reading all about this file, Apache has a good read.

RewriteEngine On 
RewriteCond %{HTTPS} off 
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} 
[L,R=301]

WordPress too many redirects can be painful. Issues like this could effect your SEO as well. These 3 common fixes have helped me in many scenarios. If you don’t want to deal with the manual work and just get a plugin, try the Really Simple SSL plugin.

Leave a Comment

Your email address will not be published.