fbpx

How to Fix Common SSL Issues in WordPress

Due to Google’s move to flag down websites that don’t have an SSL certificate installed. This has made a lot of websites add SSL certificates to their site. But that doesn’t mean there aren’t issues that come with the SSL installation. Below I will be discussing how to fix common SSL issues in WordPress.

The NET::ERR_CERT_INVALID Error

This error message is one of the common SSL issues Chrome users will run into. Though the error happens in other browsers, the displayed error message is slightly different.

This error message simply means that there’s an issue with the settings of a website’s SSL certificate or it isn’t well configured, so the browser is unable to accept the certificate. The reason for this error includes:

  • The SSL certificate isn’t issued to the right domain or subdomain name.
  • The installed SSL certificate has expired.
  • The certificate issuing authority isn’t recognized by your browser.

If the certificate was installed by your WordPress hosting provider, you can contact them to help you fix it.

If the SSL certificate was manually installed by you, you should try to reinstall it or contact the certificate provider for assistance.

Mixed Content Errors After Switching Your WordPress to SSL / HTTPS

Another common SSL issue is mixed content errors that occur when sources on your website such as images, scripts, or stylesheets still load with the old, insecure HTTP protocol, while some of your other WordPress content loads with the secure HTTPS protocol.  

You can easily fix this with the Really Simple SSL plugin. Just go to your WordPress admin dashboard, install and activate the plugin. Then, go to Settings > SSL.

This plugin will automatically fix all the mixed content and change them all to HTTPS. You won’t have to do anything.

You can fix this manually on your WordPress site by going to your Settings on your WordPress admin dashboard. Select General and check to ensure your WordPress Address and Site Address have HTTPS URLs.

If you find any URL that’s starting with HTTP, you change them to HTTPS. Once you have completed the changes, don’t forget to save them.

Then using Better Search Replace plugin you can easily search your website database for URLs still using the old HTTP and replace them with HTTPS.

Simply install and activate the tool, then go to Tools > Better Search Replace. Add your website URL with HTTP in the Search field, and HTTPS to Replace field.

Now save the changes when you are done fixing the SSL issue. Now go back and refresh your site.

Too Many Redirects Errors

Using this code in your wp-config.php file, you are allowed by WordPress to enforce SSL / HTTPS for the admin area. This might result in too many redirects errors.

define(‘FORCE_SSL_ADMIN’,true);

To fix this error, you will have to edit your wp-config.php file using an FTP client and add the following line of code just before the line that reads “That’s all, stop editing! Happy blogging”.

define(‘FORCE_SSL_ADMIN’,true);

// in some setups HTTP_X_FORWARDED_PROTO might contain

// a comma-seperated list e.g. http,https

// so check for https existence

if (strpos($_SERVER[‘HTTP_X_FORWARDED_PROTO’], ‘https’)!== false)

$_SERVER[‘HTTPS’]= ‘on’;

When you are done with the editing, save the changes.

HTTP to HTTPS Redirect

By default, WordPress won’t automatically redirect an HTTP request on your site to HTTPS without you telling it to do so. With a plugin like Really Simple SSL, you can fix the redirect issue. But you can also manually fix it by editing your .htaccess file.

Simply go to your .htaccess file through an FTP client or the file manager and add the following code:

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{HTTPS} off

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

</IfModule>

Name Mismatch Error

This SSL issue occurs when your site’s domain name listed in the SSL certificate doesn’t match the browser URL. This dissimilarity in SSL listed domain name and browser URL will make the browser assume the SSL certificate belongs to another site instead of your own. This issue tends to happen if the SSL certificate was purchased from a third-party seller.

To fix this, you will have to add the following line of code to your .htaccess file:

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{HTTPS}off

RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L][/ht_message]

Save the changes and refresh your site.

Leave a Reply

One thought on “How to Fix Common SSL Issues in WordPress

  1. […] you get started, ensure that you have activated your SSL certificate. With your SSL activated, you can proceed with fixing the […]