After setting up MySQL and PHP on Windows for Matomo, the final step is to configure IIS as the web server. Follow the steps below to complete the setup.

Install IIS

This differs across Operating systems. Search for IIS installation online if these instructions do not match your OS.

  1. Open the Windows Control Panel.
    open windows control panel

  2. In the Programs section, select Turn Windows Features on or off.
    turn windows features on/off

  3. If Windows prompts you for permission to run the program, click Allow to continue.
  4. Select the features as shown below in the following screen and click OK to save.
    install windows features
  5. A progress bar will appear. Wait while Windows configures the selected features. This process may take several minutes.
  6. Once the installation is complete, confirm it by typing the following URL into your browser: http://localhost.
  7. If installation is successful, then you will see the IIS page.

Configure IIS to treat index.php as the default content page

  1. To open IIS Manager, click Start, type iis in the Search Programs field and press Enter.
  2. Select and open Default Document at the server level.
    select default document in iis

  3. Click Add. In the pop-up, enter index.phpand click OK to save.
    add default document iis

Configure IIS to handle PHP files

  1. Select Handler Mappings.
    select handler mappings iis

  2. Click Add Module Mapping from the right hand menu.
    add module mapping iis

  3. Configure the dialog as shown below.
    edit module mapping iis

  4. Click OK.
  5. A prompt will ask if you want to add this as a fastCGI application. Select No.

Configure IIS bindings

  1. In IIS Manager, select your website that contains Matomo.
  2. Click Bindings.
    edit site bindings iis

  3. Select Add. Enter the domain for your Matomo and click OK.
    add site bindings

  4. Confirm the binding has been added.
    check site added

  5. Update your DNS entries to point towards the server.

Configure FastCGI timeout for IIS

Next, you will need to change the configured activityTimeout in the IIS Manager under server/IIS/FastCGI Settings/Edit to a higher value than what is set to by default.

Depending on the amount of data the archiver will need to process, it may be necessary to increase the value to a very high number (such as 36000 or more – which is 10 hours) to allow the archiver to complete. Not setting this to a higher value will result in the Matomo archiver not being able to process any reports.

Once this has been changed, restart the server for the changes to take effect.

You can also follow the steps below to change the Activity Timeout setting, for example:

  1. In IIS Manager, use the filter to search for and then open FastCGI Settings.
    open fastcgi settings iis

  2. Click on Edit.
    edit fastcgi iis

  3. Change the Activity Timeout value to 36000 or more.
    change timeout

  4. Once the value has been changed, restart the server for the changes to take effect.
    restart iis server

Note: The steps to change this value may be different depending on which version of IIS you have installed.

Disable Request Filtering (for Heatmap & Session Recording plugin)

When using Heatmaps & Session Recording, in Administration admin gear icon > Diagnostics > System Check, you may encounter the following warning message:

Requesting 'https://analytics.example.com/plugins/HeatmapSessionRecording/configs.php?idsite=4&trackerid=5lX6EM&url=http%3A%2F%2Ftest.test%2F' resulted in an SSL error.
Maybe you are using a self signed certificate?
Please open the URL manually in a browser to see if the response contains 'Piwik.HeatmapSessionRecording'.
If not, you might need to modify your server configuration as this file needs to be accessible via a browser from the Internet or Intranet.

The issue is that requesting the URL path /plugins/HeatmapSessionRecording/configs.php results in a 404 error. This is likely caused by the feature “Request Filtering”, a security feature that was introduced in Internet Information Services (IIS) 7.0.

To make Heatmaps & Session Recording work as expected, you can disable Request Filtering by following the steps below. You can also learn more about Request Filtering in the IIS documentation.

To disable Request Filtering:

  1. On the taskbar, click Start > Administrative Tools > Server Manager.
  2. In the Server Manager hierarchy pane, expand Roles, and then click Web Server (IIS).
  3. In the Web Server (IIS) pane, scroll to the Role Services section, and then click Add Role Services.
  4. On the Select Role Services page of the Add Role Services Wizard:

    → un-select Request Filtering,\
  5. Click Next.
  6. On the Results page, click Close.

Now that Request Filtering is disabled, in Diagnostics > System Check you should not see the warning anymore.

Verify the web server is responding

To verify that your web server is correctly configured to execute PHP scripts, create a file in c:\Inetpub\wwwroot called phpinfo.php which contains:

<?php
phpinfo();

When you visit this page at http://127.0.0.1/phpinfo.php you see a similar phpinfo output:

windows php version

Congratulations, your web server is running and correctly configured to handle PHP requests.

Copy Matomo to the webroot for IIS

Now that IIS is setup, you will need to copy the Matomo files to the C:\Inetpub\wwwroot" folder.

Download the latest release Matomo 6.0.0 from here:

Once Matomo has been downloaded, unzip the file and copy the contents of the matomo folder to the C:\Inetpub\wwwroot folder

Verify the Matomo console command is working

Next, open a command, and run the Matomo console to check it is working as expected:

php "c:\Inetpub\wwwroot\console"

The console command output will look like this:

Continue with the Matomo Installation

Once You have MySQL, PHP and IIS setup on Windows you can continue with the Matomo 5-minute installation.

Once the Matomo 5-minute installation is complete, Matomo should now be successfully setup and running on your Windows server.

Previous FAQ: How do I install and configure PHP on Windows for Matomo?