cPanel & WHM Version 82 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

Configure Brotli per-account

Ecenica shared this idea 13 months ago
Open Discussion

As a server administrator, I would like to be able to configure Brotli on a per-domain basis, allowing each cPanel User to enable or disable it per-account, so that I can offer Brotli support without causing problems for users that don't require it.


mod_brotli has been recently released in the April 3 EasyApache update:

Unfortunately installing mod_brotli configures serverwide rules. This results in a 'double compression' issue with websites which use pre-compressed gzip css and JS files. Websites fail to load on Brotli enabled browsers (Chrome) and show the error ERR_CONTENT_DECODING_FAILED.

Instead of serverwide rules it would be better if mod_brotli.conf simply loaded the Brotli module and allowed the user to enable / disable brotli compression themselves via .htaccess. Eventually this could be controlled by the 'Optimize Website' plugin in the frontend of cPanel, which could generate the .htaccess rules for the cPanel user.

This would bring mod_brotli inline with the way mod_deflate works on cPanel and immediately resolve the 'double compression' issues encountered by allowing users to enable / disable brotli compression.