SSL Support

SSL provides a secure connection between your web containers and your visitors' web browsers. You can easily improve the security of websites running inside your web containers by enabling SSL and thus allowing data to be transmitted securely.

You can read more information about SSL on the Transport Layer Security Wikipedia page.

Managing SSL Certificates for a Web Container

Enabling SSL on one of your web containers is as easy as clicking a button, consider the following steps:

  1. When logged in to the SiteHost Control Panel, click the Containers module from the menu on the left.
  2. Click the Container Label you wish to enable SSL for.
  3. On the Container's management page for a web Container, you should see a SSL section near the bottom of the page.
  4. Hit the Enable button to issue a SSL certificate. Once enabled, you can easily disable SSL by clicking the Disable button.

Frequently Asked Questions

How does SSL work on my web container?

We have integrated our Cloud Container platform with LetsEncrypt, a free, automated and open certificate authority. This allows us to very quickly and easily request SSL certificates to be issued for your web containers with no additional cost.

You can read more about LetsEncrypt on their official website.

Can I use my own SSL certificate?

Yes, simply send through an email to us at support@sitehost.co.nz and we can either supply you with a brand new SSL certificate or if you already have a certificate we'll be happy to set this up for you.

For additional information on purchasing a SSL certificate from us, please see our SSL Certificate pricing page.

How can I enforce HTTPS on my web container?

With Cloud Containers the traditional approach to redirection may not work, because all of the requests are served by a reverse proxy. Instead, we recommend leveraging the X-Forwarded-Proto header; modify your web server configuration files as follows:

For containers running Apache webserver:

RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

For example, with a default Apache based website container, the 000-default.conf file can be modified with these lines to force such redirection:

SetEnvIf X-Forwarded-Proto https HTTPS=on

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

You can find this file in your home directory, inside the configuration folder: config/apache2/sites-available/ Alternatively, the same instructions can be instead added to your base .htaccess file in your public directory.

For containers running Nginx add the following to server directive:

if ($http_x_forwarded_proto != 'https') {
    rewrite ^ https://$host$request_uri? permanent;
}

For example for a Nginx container the configuration will look something like the below:

server {
    listen 80 default_server;

    # Your other config here.
    # and here...

    if ($http_x_forwarded_proto != 'https') {
        rewrite ^ https://$host$request_uri? permanent;
    }
}

The containers must be rebooted for the change to take place: log into the SiteHost control panel, find the container you have modified the configuration of and press the Reboot button.