Fix SSL Mixed Content Issues on WordPress

At times it is noticed that SSL is installed on a WordPress site but on the web browser the green padlock icon is not visible. This issue is caused due to the mixed contents present in your site code.

Mixed content means there are some URLs with HTTP present on your website

You can simply view the page source in your browser by right click on the page, click on ‘view page source’. Search for ‘http://’ you will see URLs present on your site.

There are two simple ways to solve this, either with a plugin or by adding a forceful redirection code in the .htaccess file of your domain.

First, solving this issue with a plugin.

If you have a WordPress website then there is a light and simple plugin for this called “SSL Insecure Content Fixer” by Webware.

There are two ways to install it, either install automatically through the WordPress admin, or download the .zip file, unzip to a folder, and upload the folder to your /wp-content/plugins/ directory and Activate the plugin through the ‘Plugins’ menu in WordPress.

For manual installation, you can download the plugin from here.

Second, by adding a code in the .htaccess file.

You have to log in to the cPanel account access to the file manager, locate the .htaccess file.

Go to the File Manager in your cPanel:

Set your File Manager to show hidden files to see the .htaccess file:

Edit the .htaccess file:

add the forceful redirection code provided below on the top of the .htaccess file of your domain.

```
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(www\.)?coolexample\.com
RewriteRule ^(.*)$ https://www.coolexample.com/$1 [R,L]
```

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *