> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.hodi.host/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# What is "mod_pagespeed"?

PageSpeed (the Apache `mod_pagespeed` module) optimizes your pages **as they are sent to the visitor**, without touching your site's files. For example, it can:

* strip unnecessary whitespace and comments from the HTML,
* minify and combine your CSS and JavaScript files,
* recompress your images and serve them as WebP to compatible browsers,
* apply a long cache lifetime to your static assets.

Your source files stay strictly unchanged. If you disable PageSpeed, your site is served as-is again, immediately.

## How do I enable it?

1. In cPanel, open **PageSpeed** (Domains section, or the left-hand menu).
2. Your domains are listed with their status: *Enabled*, *Disabled* or *Not configured*.
3. Click **Configure** next to the domain you want.
4. The *Recommended* preset is already selected. Click **Save**.

That's it: the changes take effect immediately, there is nothing to restart.

## Which preset should I choose?

| Preset | What it does | Who it's for |
| --- | --- | --- |
| **Recommended** | Only the rules that leave your pages strictly equivalent: minification, image recompression, caching. | Everyone. This is the right starting point. |
| **Performance** | Adds the rules that merge and rewrite assets (CSS/JS bundling, WebP, resizing). | Showcase sites, and sites that load a lot of files. Test after enabling. |
| **All** | Enables every rule, including the most intrusive ones. | For testing only, on a site you can check page by page. |
| **None** | Unticks everything, to start from scratch. | |

You can then tick or untick each rule individually.

## What do the Safe, Moderate and Advanced badges mean?

They indicate the risk that a rule changes something visible on your site:

* **Safe**: no visible change. Your page is simply lighter.
* **Moderate**: the rule merges or rewrites assets. Check your site after enabling, as some poorly coded themes cope badly with file bundling.
* **Advanced**: the rule changes the way the page loads (lazy-loaded images, deferred JavaScript execution). Test these seriously: these are the rules that can break a carousel, a gallery or an animation.

If in doubt, stay on *Recommended*: the gain is already real and the risk is nil.

## My site displays incorrectly since I enabled it, what should I do?

Work through this in order:

1. Clear your browser cache and reload the page with a forced refresh (Ctrl+F5, or Cmd+Shift+R on Mac).
2. If the problem persists, go back into PageSpeed, click *Configure*, then select the **Recommended** preset and save. This removes every Moderate and Advanced rule.
3. If it still persists, switch the **Enable PageSpeed on this site** toggle off and save. Your site is immediately served without any optimization.
To identify the rule at fault, re-enable the rules in small groups, checking your site between each save. The usual suspects are `defer_javascript`, `lazyload_images`, `prioritize_critical_css` and `combine_javascript`.

## I've just enabled it, but I don't see any difference

That's normal for the first few minutes. PageSpeed optimizes images, CSS and JavaScript **in the background**: the very first visitors receive the original files while the optimization is being prepared. Reload the page several times, then wait a few minutes.
The HTML, for its part, is optimized from the very first load.
## Where is the configuration stored?

In the `.htaccess` file at the root of the site concerned, between two markers:

```
# BEGIN Hodi PageSpeed
...
# END Hodi PageSpeed
```

Anything outside these markers is never touched. Conversely, do not edit the content between the markers: it is rewritten every time you save from the interface.