Google PageSpeed Insights analyses the per­form­ance 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 re­quire­ments 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 in­stall­a­tion by default. If your server was created with the Minimal in­stall­a­tion option, you will need to install and configure your Apache web server before you proceed.

Free Cloud Server Trial
En­ter­prise-grade virtual private servers
  • KVM based dev servers for de­velopers
  • Scalable to en­ter­prise cloud level
  • Pay-as-you-go, per-minute billing

How to install the Google PageSpeed module on Ubuntu and Debian

First, update the server’s packages:

sudo apt-get update
bash

Download the PageSpeed module:

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

If you are using a dis­tri­bu­tion with 32-bit ar­chi­tec­ture, the last part of the download link is as follows: ./mod-pagespeed-stable_current_i386.rpm.

Install Google PageSpeed:

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

Resolve any de­pend­ency problems:

sudo apt-get -f install
bash

Restart Apache for the changes to take effect:

sudo systemctl restart apache2
bash

How to install the Google PageSpeed module on CentOS and Fedora

First, update the server’s packages:

sudo yum update
bash

Download the PageSpeed module:

wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm
bash
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:

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

Restart Apache for the changes to take effect:

sudo systemctl restart httpd
bash
rank­ing­Coach
Boost sales with AI-powered online marketing
  • Improve your Google ranking without paying an agency
  • Reply to reviews and generate social media posts faster
  • No SEO or online marketing skills needed

How to enable the Apache PageSpeed module

Now that PageSpeed is installed, it will need to be enabled. Open the PageSpeed con­fig­ur­a­tion 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:

ModPagespeed on
bash

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:

ModPagespeed off
bash
Tip

There is also a free per­form­ance 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.

Website Checker
Go to Main Menu