Frequent Questions: Simple Hosting - SSL

Define your SSL strategy

You have the possibility of making use of an SSL strategy for your website in order to force, for example, the use of the https protocol.

There are two ways you can do this:

  • From Gandi’s website, in the Sites section of your instance admin, where you can choose:
    • HTTPS only
    • HTTPS and HTTP
    • HTTP only
  • By modifying your application or website directly.

For example, on a PHP instance, you can create or modify the “.htaccess” file a the root of the “htdocs” directory of the site in question via sFTP, and add these lines, in order to redirect all traffic over HTTPS:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTPHOST}%{REQUESTURI}