GZIP Compression not working

Tried to enable GZIP, and I received the following error. Checked our Plesk "sever" and deflate is enabled, but still getting the error.

gzip is not working properly:
- Your server may not have the "deflate" module enabled (mod_deflate for Apache, ngx_http_gzip_module for NGINX)
- Another plugin may be interfering with the configuration
If re-checking and restarting does not resolve, please check with your host or open a support ticket with us.

  • Adam Czajczyk

    Hello dvfmark,

    I hope you're well today and thank you for your question!

    Please check your site's ".htaccess" file and see if this code is there:

    <IfModule mod_deflate.c>
        <IfModule mod_setenvif.c>
            <IfModule mod_headers.c>
                SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
                RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
            </IfModule>
        </IfModule>
        <IfModule mod_filter.c>
            AddOutputFilterByType DEFLATE "application/atom+xml" \
                                          "application/javascript" \
                                          "application/json" \
                                          "application/ld+json" \
                                          "application/manifest+json" \
                                          "application/rdf+xml" \
                                          "application/rss+xml" \
                                          "application/schema+json" \
                                          "application/vnd.geo+json" \
                                          "application/vnd.ms-fontobject" \
                                          "application/x-font-ttf" \
                                          "application/x-javascript" \
                                          "application/x-web-app-manifest+json" \
                                          "application/xhtml+xml" \
                                          "application/xml" \
                                          "font/eot" \
                                          "font/opentype" \
                                          "image/bmp" \
                                          "image/svg+xml" \
                                          "image/vnd.microsoft.icon" \
                                          "image/x-icon" \
                                          "text/cache-manifest" \
                                          "text/css" \
                                          "text/html" \
                                          "text/javascript" \
                                          "text/plain" \
                                          "text/vcard" \
                                          "text/vnd.rim.location.xloc" \
                                          "text/vtt" \
                                          "text/x-component" \
                                          "text/x-cross-domain-policy" \
                                          "text/xml"
    
        </IfModule>
        <IfModule mod_mime.c>
            AddEncoding gzip              svgz
        </IfModule>
    
    </IfModule>

    If not, please add it at the end of the file.

    If this doesn't help then most likely the server is setup the way it doesn't allow "mod_deflate" configuration via ".htaccess". In such case there are two options: either there's a way to enable GZIP compression via your PLESK panel and set its parameters or you may want to get in touch with your host and ask them if there are any limitations on this.

    It's possible that they will need to enable this for you or that some reconfiguration will be necessary so "mod_deflate" would support necessary MIME types ("text/html", "text/javascript", "text/css") as sometimes "mime filters" for "mod_defalte" are not configured to handle this types of files.

    Keep me updated on this please.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.