How to enable Gzip compression with Optimize Website in cPanel

Category: cPanel

cPanel Optimize Website lets you compress text content so the site transfers less data to the browser. Use it when you want to improve load times for HTML, CSS, JavaScript, or XML without manually editing .htaccess.

This option depends on the server having the Apache compression module available. If you do not see the tool in cPanel, do not attempt server changes: open a ticket so support can confirm whether it is available on your plan.

Before you start

  • Have access to the cPanel account where the site is hosted.
  • Confirm that you want to compress text files, not already compressed images such as .jpg, .png, or .webp.
  • If you use a cache plugin or CDN, identify whether it already applies compression to avoid confusing tests.
  • Keep a public site URL ready so you can validate the result after saving.

Choose what to compress

  1. Log in to cPanel.
  2. Find the Software section.
  3. Open Optimize Website. In some Spanish panels, it may appear as Optimizar sitio web.
  4. Review the available options: Disabled, Compress All Content, and Compress the specified MIME types.
  5. Decide whether you want to compress all compatible content or only specific MIME types.

Select Compress All Content in cPanel Optimize Website

For most shared-hosting sites, Compress All Content works well because Apache will only compress text content and other compressible responses. If you prefer to control the scope, use MIME types such as text/html text/plain text/xml text/css application/javascript application/json.

Enable compression in Optimize Website

  1. Select Compress All Content if you want to apply compression to all compatible files.
  2. If you choose Compress the specified MIME types, type the MIME types separated by spaces in MIME Types.
  3. Do not add images, videos, .zip files, or backups; they are already compressed or not worth compressing again.
  4. Click Update Settings to save the change.
  5. Wait for the confirmation message before closing cPanel; cPanel shows Website optimization preferences updated and confirms that content compression is enabled.

Optimize Website confirmation message in cPanel

cPanel saves this configuration in site rules, usually inside .htaccess. If your site already has custom rules, keep a backup before making other manual changes.

Verify that Gzip is working

  • Open the site in a private window and reload a public page.
  • Use an external Gzip test or the browser developer tools to review the response headers.
  • Confirm that text files such as HTML, CSS, or JavaScript show content-encoding: gzip or equivalent compression.
  • If you use CDN or cache, clear cache and repeat the test from a URL that is not stored in the browser.

If the test does not change immediately, wait a few minutes and check another page. Some plugins or CDNs may serve a cached version until you clear cache.

Common errors

  • Optimize Website does not appear in cPanel: the server may not have the required module enabled; contact support to confirm it.
  • You add images to the MIME types: it does not improve site weight and can waste resources; compress only text such as HTML, CSS, and JavaScript.
  • The test still says compression is disabled: there may be cache, a CDN, or a URL serving external content; clear cache and validate a file from the same hosting account.

Still need help?

If this guide didn’t solve your issue, our team can help you via ticket.