---
title: "Force HTTPS in Matomo Analytics"
description: "There are many ways to force a website to use HTTPS for a secure SSL connection including the .htaccess 301 redirect and HTTP Strict Transport Security (HSTS) preload list. Below we cover how to..."
url: https://www.inmotionhosting.com/support/website/analytics/force-https-matomo-analytics/
date: 2018-11-14
modified: 2021-08-16
author: "InMotion Hosting Contributor"
categories: ["Web Analytics"]
type: post
lang: en
---

# Force HTTPS in Matomo Analytics

There are many ways to force a website to use HTTPS for a secure SSL connection including the [.htaccess 301 redirect](/support/website/ssl/how-to-force-https-using-the-htaccess-file/) and [HTTP Strict Transport Security (HSTS) preload list](/support/website/force-hsts-using-htaccess/). Below we cover how to **force Matomo to use HTTPS with the configuration file and ForceSSL plugin**. [Config File](#config) [Install Plugin](#plugin) [Deactivate Redirect](#deactivate)

## Edit Configuration File

Editing the configuration file is the easiest option for those with access.

1. **Edit your *config/config.ini.php* file** using [cPanel File Manager or FTP](/support/website/how-to-edit-a-file/).
2. Under **, **change the number** beside force_ssl = from **0** to **1**.Matomo should redirect to HTTPS automatically next time you login Matomo.

## Install ForceSSL Plugin

For those unable to access the config file, you can install the [ForceSSL plugin](https://plugins.matomo.org/ForceSsl).

1. **Login Matomo**.
2. Select the **Administration icon** beside *All Websites*.
3. Select **Marketplace** under *Platform*. [![Select Marketplace under Platform](https://www.inmotionhosting.com/support/images/stories/matomo-analytics/matomo-40-platform-marketplace.png)](https://www.inmotionhosting.com/support/images/stories/matomo-analytics/matomo-40-platform-marketplace.png)
4. On the right, search **ForceSSL** and press **Enter**. [![Search ForceSSL](https://www.inmotionhosting.com/support/images/stories/matomo-analytics/matomo-41-search-plugins.png)](https://www.inmotionhosting.com/support/images/stories/matomo-analytics/matomo-41-search-plugins.png)
5. Select **Install**. [![Click Install](https://www.inmotionhosting.com/support/images/stories/matomo-analytics/matomo-42-plugin-install-force-ssl.png)](https://www.inmotionhosting.com/support/images/stories/matomo-analytics/matomo-42-plugin-install-force-ssl.png)
6. Select **Activate Plugin**. [![Activate Plugin](https://www.inmotionhosting.com/support/images/stories/matomo-analytics/matomo-43-plugin-activate-force-ssl.png)](https://www.inmotionhosting.com/support/images/stories/matomo-analytics/matomo-43-plugin-activate-force-ssl.png)Matomo should redirect to HTTPS automatically next time you login Matomo.

## Deactivate ForceSSL

You may need to disable the HTTPS redirect if your SSL expires. You can deactivate the plugin within the config file or dashboard.

1. Select **Plugins** under *System*. [![Select Plugins under System](https://www.inmotionhosting.com/support/images/stories/matomo-analytics/matomo-45-system-plugins.png)](https://www.inmotionhosting.com/support/images/stories/matomo-analytics/matomo-45-system-plugins.png)
2. Select **Deactivate** on the right of **ForceSSL**. [![Select Deactivate](https://www.inmotionhosting.com/support/images/stories/matomo-analytics/matomo-46-plugin-deactivate-plugins-force-ssl.png)](https://www.inmotionhosting.com/support/images/stories/matomo-analytics/matomo-46-plugin-deactivate-plugins-force-ssl.png) You can uninstall it on the same page if preferred but its not necessary.

You can read more about improving your web analytics in our [Matomo Analytics section](/support/edu/wordpress/plugins/matomo-analytics/).
