How to enable gzip compression in Apache on Plesk server?




  • Avatar
    Mattia Gregolin

    Thank you. This was very helpful for my Amazon Ec2 instance!

  • Avatar
    Deyvi Arellano

    Disculpa pero cuando realizo lo siguiente me deja de funcionar apache! 

  • Avatar
    Alexandr Tumanov


    Could you please share the information about the error? Apache version? The article was verified and no errors with apache were found.

  • Avatar
    Gianluca (Edited )

    Please correct the row number two on the ssh code section:

    # Compress HTML, CSS, JavaScript, Text, XML and fonts AddOutputFilterByType DEFLATE application/javascript

  • Avatar
    Ivan Postnikov

    Hello @Gianluca,

    Thank you for noticing. The article was updated.

  • Avatar
    Jan Bludau


    there should be an option in plesk to do that serverwide alone...

    per domain a "infobox" where you can grab the needed code

  • Avatar
    Dinara Aspembitova (Edited )

    Hello @Jan Bludau,


    >there should be an option in plesk to do that serverwide alone...

    Take part in our product improvement and vote for this feature on Plesk UserVoice. The top-ranked suggestions are likely to be included in the next versions of Plesk.

    As for "infobox" could you please share the details and clarify the usecase?

  • Avatar
    Marco Marsala

    On my server I didn't do such configuration, I don't have such files, but all replies are still compressed (HTTP Response Header contains Content-Encoding: gzip).

  • Avatar
    Alisa Kasyanova

    @Marco Marsala
    Have you checked this article as well: ? If sites are using WordPress, there could be plugins that enable gzip compression.

Please sign in to leave a comment.

Have more questions? Submit a request