How do I Force HTTPS in Grav CMS?

Grav allows you to force SSL (HTTPS) usage within the configuration file or admin plugin. Note that Grav recommends in a Github thread to use the .htaccess file instead for faster website performance. Below we enable HTTPS using SSH or the admin plugin.


Force SSL in CLI

  1. Log into cPanel File Manager or FTP.
  2. Navigate to the /user/config folder.
  3. Open the system.yaml file.
  4. Change force_ssl: false to true.
  5. Save your changes.

Force SSL with Admin Plugin

  1. Log into Grav.
    Force SSL in Grav
  2. Select Configuration.
  3. At the bottom, select Yes beside Force SSL.
  4. Press Save at the top.

After this, configure scheduled backups. Learn more about Grav in our Support Center. Want another option to improve caching in Grav? Optimize your Grav website performance with our WordPress Hosting (not just for WordPress) and Nginx Cache Manager.


It looks like this article doesn't have any comments yet - you can be the first. If you have any comments or questions, start the conversation!

Was this article helpful? Let us know!