How to enable deflate option in cPanel? Print

  • 0

If you are trying to use deflate option in your .htaccess, you might be getting Internal Error such as:

.htaccess: Unknown filter provider DEFLATE

To fix this error and enable deflate in your cPanel server, you have to build Apache with deflate option.
  1. Log into WHM 
  2. After you are logged in, search for "EachApache" in left menu and go to the main page
  3. Select "previously saved config" and click on "start customizing based on profile"
  4. Keep clicking "next" until you see the option for "exhaustive option list" and click on the button
  5. Look for "deflate" and check the box
  6. Click on "save and build" at the bottom of the page
*Build process can take anywhere from 15 minutes to 30 minutes depending on the server specs.  Once complete, you can start using deflate tags in your .htaccess and also enable optimization in cPanel for the website.  This option is located under "Software/Services" and it is called "Optimize Websites".  

Here is an example of the deflate code that you can use in .htaccess after you enable it on the server -

# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript


Was this answer helpful?

« Back
  • US/Canada: 800-933-1517
  • International: 626-549-2801