Setting up an SSL certificate on a WordPress site can sometimes lead to a few issues. If you’re adding SSL to an existing WordPress site and are running into errors, then you’re in luck. In this guide, we will cover how to fix the most common issues with SSL / HTTPs in WordPress.
Why Should You Start Using SSL?
Simply stated, SSL is an encryption method that secures the connections between your browser and your WordPress hosting server. If not installed properly, or it doesn’t match, then most of the modern browsers will show a warning to the user stating that they should not connect to the website.
Every SSL / HTTPS certificate has a unique SSL Certificate for identification purposes. If a server is affected to be on HTTPS, and its certificate does not match, then most browsers will warn users from connecting to the website.
Last year, Google inform to improve overall web security by encouraging website owners to start using SSL / HTTPS. Since then, Google’s Chrome web browser marks all websites without SSL certificate as “Not Secure”.
The label ‘Not Secure’ in the browser’s address bar gives a bad impression about your business to your customers.
If you want to make an online store or you want to use payment services such as PayPal, Strip, Authorize.net etc. you need SSL / HTTPS enabled.
Here, you will find the solution to the most common WordPress SSL problems.
1. Fix NET::ERR_CERT_INVALID Error
If you are using Google Chrome, you might be seeing this error on your WordPress site. In the case of the other browsers, like Mozilla Firefox, you will see it being slightly changed. However, the meaning is the same. It warns you about potential hacks, attacks or threats on your website.
This error message indicates that the user’s browser has not accepted the certificate submitted by the website. It can be caused by a number of factors:
1) The SSL certificate is issued for another domain name or subdomain.
2) The certificate has expired.
3) Browser doesn’t identify certificate issuing authority.
If you have purchased an SSL certificate and have requested your WordPress hosting provider to install it for you, then you can contact certificate provider to fix it.
If you have manually installed the SSL certificate on your site, try reinstalling it or contact your SSL certificate provider for help.
2. Fix Mixed Content Errors After Moving WordPress to SSL / HTTPS
Mixed content errors are due to sources (images, scripts, or stylesheets) that are still loading using URLs in the unsafe HTTP protocol.
In this case, you will not be able to see a secure padlock icon in the address bar of your website.
There are two ways to fix SSL / HTTPS mixed content errors in WordPress. You can choose one that works best for you.
- Fix mixed content errors in WordPress by using a Plugin
This is an easy method for freshers. Just install and activate the really simple SSL plugin.
Upon activation, you need to visit Settings » SSL page to review plugin settings. Really Simple SSL works out of the box and will automatically take care of SSL / HTTPS settings and fix mixed content errors.
- Manually Fix Mixed Content Errors in WordPress
Manually fixing mixed content errors is more effective and better for performance. You have check and make sure that you are using HTTPS in WordPress settings. Go to Settings »General Page and see the WordPress address and site address options have HTTPS URLs.
If you find URLs starting with HTTP, then you need convert to HTTPS and click Save Changes button to store your settings.
After this, you need to find the old HTTP URL in your WordPress database and replace all with the new HTTPS URL.
You can do this easily by installing and activating the Better Search Replace plugin. For more information, see our best Guide on how to install the WordPress Plugin.
After activation, you need to look at Tools » Better Search Replace page. In the ‘Search’ field, you must add your website URL with HTTP After that, add your website URL with https in the ‘Replace’ field.
The plugin will now automatically update the url in your WordPress database.
If you are still notice mixed content errors, then troubleshoot URLs in your WordPress theme and plugins.
Using your browser’s Inspector Tool and find out the resources due to errors and where they are loading from. You have to find them in your WordPress theme and replace the HTTP with HTTPS.
3. Fix Too Many Redirects Errors After Moving to SSL / HTTPS
WordPress allows you to enforce SSL / HTTPS for the admin area by entering the following line into your wp-config.php file.
However, in some scenarios this setting alone would cause ‘Too many redirects‘ error. To fix this, you will need to add the following code to your wp-config.php file just before the line that says ‘That’s all, stop editing! Happy blogging.’.
4. Fix WordPress HTTP to HTTPS Redirect
WordPress will not automatically redirect HTTP requests to HTTPS excep you ask to do so. If you are actually using plugins like Really Simple SSL, it will take care of the redirect. Otherwise, you have to set up a redirect manually.
To set up HTTP over HTTPS redirects, you must add the following code to your .htaccess file.
We hope this article helped you fix some common issues with SSL / HTTPS in WordPress. If in any case you encounter a problem that was not covered in this article, leave a comment and we’ll post a separate article with a solution.
For the meantime, you may also want to read on the importance of SSL in a website.