Install on IIS
Last updated Edit this page View as Markdown
Install the mod_pagespeed IIS module on Windows Server: requirements, the signed MSI, IIS Express, the optional optimizer service and the first check.
On this page
mod_pagespeed runs on IIS as a native, in-process module: the successor to
IISpeed. Download the signed MSI, run it, iisreset, and the module optimizes
every site that has a pagespeed.config. The IIS package ships from the 1.15
packaging channel.
Requirements
- Windows Server 2019 or later (IIS 10 or later)
- 64-bit only
- Visual C++ Redistributable 2022
- The IIS worker process identity needs write access to the cache directory; the installer grants it for the default directory
Install the module
- Download the IIS MSI installer. Each binary has a
.ascsignature next to it. - Run it on the Windows Server host. The installer registers the module in
IIS as a native HTTP module and creates the default cache directory at
%ProgramData%\We-Amp\IISWebSpeed\Cache. - Run
iisreset.
The module reads pagespeed.config: a server-level file at
%ProgramData%\We-Amp\PageSpeed\pagespeed.config and, optionally, one in each
site’s physical root. The minimal file is two lines:
pagespeed on
pagespeed FileCachePath %ProgramData%\We-Amp\IISWebSpeed\Cache
IIS configuration documents the file format, the lookup order and path matching.
Coming from IISpeed
If IISpeed is installed on this host, uninstall it before running the MSI.
The two modules register the same handler in IIS and cannot coexist. Open
Apps & features (or Programs and Features), remove “IISpeed”, run
iisreset, then run the installer.
Migrate from IISpeed walks through the whole
move, configuration and cache included.
The optimizer service
The installer also installs the optimizer worker, as the Windows service
WeAmpPageSpeedOptimizer under its own virtual account, and leaves it
disabled: until you turn it on, the module behaves exactly as it does
without it. Turned on and pointed at with the DaemonSocketPath and
DaemonVolumePath directives, it takes over in-place optimization: the module
records each eligible resource, the optimizer builds optimized variants, and
the module serves the variant that fits each client. An upgrade or repair with
the installer keeps a service you turned on running and keeps the cache size
you chose (OPTIMIZERCACHESIZE, 1 GiB by default).
IIS Express
For local development with IIS Express, add the module to
applicationhost.config in %userprofile%\Documents\IISExpress\config\:
- Copy the module DLL to a known location
- Add the module registration under
<globalModules>and<modules> - Restart IIS Express
Verify it works
On IIS the module emits X-Page-Speed, the same header as the nginx module.
Check for it with PowerShell:
(Invoke-WebRequest http://localhost/ -Method Head).Headers["X-Page-Speed"]
Then open /pagespeed_global_admin on the server itself.
Is it working? has the other checks.
Next steps
- IIS configuration:
pagespeed.config, lookup order, path matching and IIS tuning - Filter selection: choosing and tuning filters
- Admin console: restricting the admin pages
- Migrate from IISpeed
Frequently asked questions
Can the IIS module and IISpeed run on the same host?
No. Both register the same handler in IIS and one or both fail at site startup. Uninstall IISpeed, run iisreset, then run the MSI. Your IISpeed configuration files keep working.
Does the IIS installer include the optimizer worker?
Yes, as the Windows service WeAmpPageSpeedOptimizer, installed disabled. Until you turn it on and point the module at it with DaemonSocketPath and DaemonVolumePath, the module optimizes on its own exactly as before.