• Resolved Alexandra A.

    (@montenegroecoadventuresorg)


    Hi Anton, I get the following message:

    Gzip is not working properly:

    – Your server may not have the “deflate” module enabled (mod_deflate for Apache, ngx_http_gzip_module for NGINX).
    – Contact your host. If deflate is enabled, ask why all .htaccess or nginx.conf compression rules are not being applied.

    I did contact my host, they say they enabled the correct module (over 48 hours ago).
    But the error still remains.
    Can you please help? It is quite important to optimize my site!
    Thanks
    Alex

    The page I need help with: [log in to see the link]

Viewing 10 replies - 16 through 25 (of 25 total)
  • Thread Starter Alexandra A.

    (@montenegroecoadventuresorg)

    Anton, I added your script at the top of BOTH .htaccess and got twice internal error.

    You asked me to otherwise contact my host support asking why Gzip Compression is not working and how to enable it > I contacted them three times, they checked three times and confirmed that GZIP is 100% working on the server. So I believe the problem comes from the script written by Hummingbird in my .htaccess files.
    Thanks in advance for your help.
    Alexandra

    @montenegroecoadventuresorg,

    Please try replacing your current file.

    If the above version gives you an error, try this one (I’ve removed the lines that could be causing errors):

    AddHandler x-mapp-php5.5 .php
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
    <IfModule mod_deflate.c>
    # Compress HTML, CSS, JavaScript, Text, XML and fonts
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
    AddOutputFilterByType DEFLATE application/x-font
    AddOutputFilterByType DEFLATE application/x-font-opentype
    AddOutputFilterByType DEFLATE application/x-font-otf
    AddOutputFilterByType DEFLATE application/x-font-truetype
    AddOutputFilterByType DEFLATE application/x-font-ttf
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE font/opentype
    AddOutputFilterByType DEFLATE font/otf
    AddOutputFilterByType DEFLATE font/ttf
    AddOutputFilterByType DEFLATE image/svg+xml
    AddOutputFilterByType DEFLATE image/x-icon
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/javascript
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/xml
    </IfModule>
    
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/css A2419200
    ExpiresByType text/x-component A2419200
    ExpiresByType application/x-javascript A2419200
    ExpiresByType application/javascript A2419200
    ExpiresByType text/javascript A2419200
    ExpiresByType text/x-js A2419200
    ExpiresByType text/html A3600
    ExpiresByType text/richtext A3600
    ExpiresByType image/svg+xml A3600
    ExpiresByType text/plain A3600
    ExpiresByType text/xsd A3600
    ExpiresByType text/xsl A3600
    ExpiresByType text/xml A3600
    ExpiresByType video/asf A2419200
    ExpiresByType video/avi A2419200
    ExpiresByType image/bmp A2419200
    ExpiresByType application/java A2419200
    ExpiresByType video/divx A2419200
    ExpiresByType application/msword A2419200
    ExpiresByType application/vnd.ms-fontobject A2419200
    ExpiresByType application/x-msdownload A2419200
    ExpiresByType image/gif A2419200
    ExpiresByType application/x-gzip A2419200
    ExpiresByType image/x-icon A2419200
    ExpiresByType image/jpeg A2419200
    ExpiresByType application/json A2419200
    ExpiresByType application/vnd.ms-access A2419200
    ExpiresByType audio/midi A2419200
    ExpiresByType video/quicktime A2419200
    ExpiresByType audio/mpeg A2419200
    ExpiresByType video/mp4 A2419200
    ExpiresByType video/mpeg A2419200
    ExpiresByType application/vnd.ms-project A2419200
    ExpiresByType application/x-font-otf A2419200
    ExpiresByType application/vnd.ms-opentype A2419200
    ExpiresByType application/vnd.oasis.opendocument.database A2419200
    ExpiresByType application/vnd.oasis.opendocument.chart A2419200
    ExpiresByType application/vnd.oasis.opendocument.formula A2419200
    ExpiresByType application/vnd.oasis.opendocument.graphics A2419200
    ExpiresByType application/vnd.oasis.opendocument.presentation A2419200
    ExpiresByType application/vnd.oasis.opendocument.spreadsheet A2419200
    ExpiresByType application/vnd.oasis.opendocument.text A2419200
    ExpiresByType audio/ogg A2419200
    ExpiresByType application/pdf A2419200
    ExpiresByType image/png A2419200
    ExpiresByType application/vnd.ms-powerpoint A2419200
    ExpiresByType audio/x-realaudio A2419200
    ExpiresByType image/svg+xml A2419200
    ExpiresByType application/x-shockwave-flash A2419200
    ExpiresByType application/x-tar A2419200
    ExpiresByType image/tiff A2419200
    ExpiresByType application/x-font-ttf A2419200
    ExpiresByType application/vnd.ms-opentype A2419200
    ExpiresByType audio/wav A2419200
    ExpiresByType audio/wma A2419200
    ExpiresByType application/vnd.ms-write A2419200
    ExpiresByType application/font-woff A2419200
    ExpiresByType application/vnd.ms-excel A2419200
    ExpiresByType application/zip A2419200
    </IfModule>

    The above contains Gzip compression code from Gtmetrix, which is another reputable source trusted by a lot of users: https://gtmetrix.com/enable-gzip-compression.html

    Unfortunately, if you’re saying that both HB and above solutions are not working, I don’t think there’s much I can help you with. The .htaccess file allows you to modify only the configuration that is made available from your host. If something is not working, it means that the configuration is blocked or not properly configured on the server. There could be various reasons for that, but all of them are fixable only by your host.

    Best regards,
    Anton

    Thread Starter Alexandra A.

    (@montenegroecoadventuresorg)

    Hey Anton,
    thanks for clarifying.
    I replace the content of my .htaccess file with your code (copy/paste 100%) and I have an internal 500 error when I tried to access my site… it doesn’t seem to like it!
    Can you please let me know what is the next step? I really need to solve this issue. My provider guaranteed there is no problem on their end.
    Cheers
    Alexandra

    @montenegroecoadventuresorg,

    It’s erroring out, because some module is not installed on the server.

    You can start with the default WordPress .htaccess file:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    and start adding rules one-by-one, check which one leads to the error.

    Best regards,
    Anton

    Thread Starter Alexandra A.

    (@montenegroecoadventuresorg)

    Hey Anton,

    after multiple tests, I found out that it is the part you sent me between # BEGIN WordPress and # END WordPress that is faulty!?! I found another one on internet, which worked. then added the 2 other modules you gave me above, and I don’t get the error 500!
    Now I am back in Hummingbird, and when I recheck the status for GZIP compression, only HTML is active …. :-(((
    What is the next step?

    @montenegroecoadventuresorg,

    Unfortunately, there are no other extra or special rules for .htaccess. It either works, if it’s properly configured on the server, or it doesn’t. If this is another site, not the one linked in your first post, please share a link, I will check if you might have Nginx serving CSS and JS files. But that, again, will require action from your hosting company.

    Best regards,
    Anton

    Thread Starter Alexandra A.

    (@montenegroecoadventuresorg)

    Thanks Anton for your response.
    The 2 sites I am trying to make it work on are:
    https://www.znuggle.me
    and
    https://www.spondeotravel.com

    I have the same problems on both.
    If you maintain that my hosting company needs to take action (though they say it is full enabled on their server), then which specific actions should I ask them to take?
    CHEERS
    Alex

    @montenegroecoadventuresorg,

    I would say that you cannot enable gzip compression for static assets with .htaccess rules. It could be that this setting cannot be changed via .htaccess, or it’s changed somewhere in the hosting control panel. In any case, they should point you in the right direction. You can also, refer them to the Gtmetrix page that I posted above.

    Best regards,
    Anton

    Thread Starter Alexandra A.

    (@montenegroecoadventuresorg)

    Dear Anton,

    I wanted to let you know that after asking over 5 times my hosting support team at IONOS, who had always tell me GZIP was activated on my server, they realized there was a problem on the server, moved me to another server and it now works!! Thank you so much for your support, wouldn’t have been possible to solve the issue without your help!
    Have a nice day,
    Alexandra

    @montenegroecoadventuresorg,

    Awesome news! Glad that your issue has been fixed.

    Best regards,
    Anton

Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘Gzip is not working properly’ is closed to new replies.