SSL Certificates are of unprecedented importance these days. The security certificate affects search engine rankings and browsers are also slowly making them mandatory. Very good since security on the Internet is hugely important!
It is good to see that many websites now have an SSL Certificate. What we often notice is that websites with an SSL certificate are still considered unsafe by the browser. This is obviously bad for the reliability of your visitor.
Very often this is because sources such as images, javascript files and other files are loaded over an HTTP connection. If you inspect the website (in Google Chrome it's F12) a window of code will pop up. A console can also be seen here:
The console will then say that sources are loaded over an insecure connection. This is relatively easy to solve by changing the url of the source to https. If you have a large website with many pages I can imagine that you do not want to go through all the pages to change the url.
Fortunately, it can also be done a lot faster.
Resolving mixed content with htaccess
There is a .htaccess file on every server. This allows you to tell all incoming traffic what to do. This way, you can force all resources on your Web site to use an HTTPS connection.
By placing the code below at the top of the .htaccess file, you force the resources to load over an https connection.
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
Mixed content troubleshooting for WordPress
Very many websites run on the well-known CMS WordPress and these too suffer from mixed content. Fortunately, it can be solved with WordPress as well! The way mentioned above will also work for websites running on WordPress. Should you not have access to the server, there is also another way.
Anyone familiar with WordPress is also familiar with the phenomenon of plug-ins. To resolve mixed content for WordPress websites, we need to install the Really Simple SSL plug-in.
Before installing this plug-in, we would like to point out that you should make a backup of the website first. If something goes wrong you can always restore it.
Once the plug-in is activated, you will see that the mixed content problem is solved and the browser also says that your website is nicely secured.
If you have any questions please contact us via chat or at info@webgrowth.nl.