# How to install the Google PageSpeed module on Apache

[Google PageSpeed Insights](https://www.ionos.com/digitalguide/online-marketing/search-engine-marketing/google-pagespeed-insights/) analyzes the performance of your website. Learn how to install and enable the Google PageSpeed module on an Apache web server on Linux to use the analytics tools.

## What are the requirements for PageSpeed on Apache?

- A cloud server with a Linux server operating system (CentOS, Fedora, Ubuntu, Debian)
- Apache installed and running

Note Apache is installed and running on a standard Linux installation by default. If your server was created with the Minimal installation option, you will need to [install and configure your Apache web server](https://www.ionos.com/digitalguide/server/configuration/how-to-install-an-apache-web-server/) before you proceed.

## How to install the Google PageSpeed module on Ubuntu and Debian

First, update the server’s packages:

```bash
sudo apt-get update
```

Download the PageSpeed module:

```bash
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb
```

Note If you are using a distribution with 32-bit architecture, the last part of the download link is as follows: `./mod-pagespeed-stable_current_i386.rpm`.

Install Google PageSpeed:

```bash
sudo dpkg -i mod-pagespeed-*.deb
```

Resolve any dependency problems:

```bash
sudo apt-get -f install
```

Restart Apache for the changes to take effect:

```bash
sudo systemctl restart apache2
```

## How to install the Google PageSpeed module on CentOS and Fedora

First, update the server’s packages:

```bash
sudo yum update
```

Download the PageSpeed module:

```bash
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm
```

Note In the case of a 32-bit system, the last part of the download link is as follows: `./mod-pagespeed-stable_current_i386.rpm`.

Install Google PageSpeed:

```bash
sudo rpm -U mod-pagespeed-*.rpm
```

Restart Apache for the changes to take effect:

```bash
sudo systemctl restart httpd
```

## How to enable the Apache PageSpeed module

Now that PageSpeed is installed, it will need to be enabled. Open the PageSpeed configuration file for editing:

- Ubuntu/Debian: `sudo nano /etc/apache2/mods-available/pagespeed.conf`
- CentOS/Fedora: `sudo nano /etc/httpd/conf.d/pagespeed.conf`

Add the following line to the top of the file:

```bash
ModPagespeed on
```

Save and exit the file. Then restart Apache for the changes to take effect:

- Ubuntu/Debian: `sudo systemctl restart apache2`
- CentOS/Fedora: `sudo systemctl restart httpd`

If you want to disable PageSpeed, open the `pagespeed.conf` file again for editing and change the first line to:

```bash
ModPagespeed off
```

Tip There is also a free performance checking tool available from IONOS. In addition to the loading speed, the IONOS Website Checker also registers the website’s general settings as well as SEO aspects and its security.


This is a markdown version of: [https://www.ionos.com/digitalguide/server/configuration/install-google-pagespeed-modules-on-apache/](https://www.ionos.com/digitalguide/server/configuration/install-google-pagespeed-modules-on-apache/) for AI/LLM consumption.