Using Wordpress with HTTPS on the Kinamo hosting platform

Last updated on 28 Sept 2023, 10:18:04.
Category: All about web hosting | Webhosting settings

PHP SSL Wordpress

This article explains on how you may use an SSL certificate on the Kinamo hosting platform. The Kinamo hosting platform uses HAProxy load balancers and SSL offloading. This means that for detecting your secure website, you will have to make some changes to the Wordpress installation so it correctly detects the secured traffic.

Capturing the HTTPS header and the correct client IP addresses

To avoid Wordpress giving errors on each element not correctly sent through HTTPS you will have to tell it that you are using SSL.An additional step is by capturing the right client IP. If you do not make this change, all visitor IP's for posts and comments will appear to be coming from the same IP, namely the Kinamo load balancer IP.This van be done, by simply adding the following code to the wp-config.php:

// ** Kinamo SSL ** //
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'){
 $_SERVER['HTTPS']='on';
 $_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_X_FORWARDED_FOR"];
}

define('FORCE_SSL_ADMIN', true);


Capturing URL rewrites

As a final precaution you must alter the .htaccess file of your Wordpress site, by adding the following rules. If you fail to do so, chances are the URL of your site will not be correctly determined and you will end up with an infinite redirect loop:

<IfModule mod_rewrite.c>

RewriteEngine On
RewriteCond % !https
RewriteCond % off
RewriteRule ^ https://%% [L,R=301]

</IfModule>

Correcting HTTP content

To conclude you can replace hardcoded HTTP pointers with the correct HTTPS URL. Wordpress typically saves content as images with hardcoded absolute URL's in the database. A simple and effective way is by using a plugin called the Wordpress SSL Insecure Content Fixer plugin. This plugin will replace the URL's with their correct HTTPS variant.
As an alternative you can always dive into the database and do the replacement of the URL's there.


Related articles

Discover here how we’ve fixed a blocking error when upgrading ESXi 6.5 to 7.0 update 2 through vSphere Lifecycle Manager.

Kinamo maintains multiple VMware vSphere clusters, not only for our own infrastructure, but also for a variety of customers. As...

Read more

Why do I see a yellow warning triangle on an HTTPS secured website?

The yellow warning triangle you may see when visiting a webpage that's secured with SSL, is an indication that Google...

Read more

Hoe de taal van Kinamo webmail aanpassen

Dit FAQ-artikel legt uit hoe je de taal van de gebruikersinterface kunt aanpassen in Kinamo Webmail

Read more

Need extra help?

Were not all your questions answered?
Don't worry, we will be happy to help you via a support request!

Kinamo

Select your language

All languages: