1. Home
  2. cPanel
  3. How to manage mod_pagespeed for your website

How to manage mod_pagespeed for your website

To increase your website loading speeds, RedyHost implemented Google’s built mod_pagespeed module in Apache or Nginx. This module recompresses static files, served by your web site, to reduce their size and to improve overall satisfaction of your website’s visitors.

The mod_pagespeed module respects every cache expiration header that is set by your website. This allows seamless integration with most websites’ cache management.


If your website experiences a problem with mod_pagespeed, you can easily disable it by adding the following lines at the top of your .htaccess file:

<IfModule pagespeed_module>
  ModPagespeed off

Alternatively you may try and disable filters that may cause the problem. For example, to change the level of image recompression, put this in your .htaccess file (change iage recompression quality to 90%):

<IfModule pagespeed_module>
  ModPagespeedImageRecompressionQuality 90
  ModPagespeedJpegRecompressionQuality 90
  ModPagespeedJpegRecompressionQualityForSmallScreens 90
  ModPagespeedWebpRecompressionQuality 90
  ModPagespeedWebpRecompressionQualityForSmallScreens 90

To turn off image rewriting completely, use this in your .htaccess file:

<IfModule pagespeed_module>
  ModPagespeedDisableFilters rewrite_images

How to activate some disabled filters

In shared hosting environments RedyHost may disable certain filters to avoid errors (for example, Javascript and CSS compression/minification filters). To re-activate those filters and have JS and CSS files combined together, minified and compressed, add the following example to your .htaccess file:

<IfModule pagespeed_module>
  ModPagespeedEnableFilters rewrite_javascript,combine_javascript,rewrite_css,combine_css


Use cPanel’s Nginx plugin to configure mod_pagespeed. Currently you can activate or deactivate mod_pagespeed in Nginx via cPanel

mod_pagespeed introductory video by Google

Updated on 7 June, 2017

Was this article helpful?

Related Articles