[Hummingbird Pro] gzip in hummingbird pro

Hi,

When I enable gzip, it says, "server may not have the "deflate" module enabled", however mod_deflate is installed on the server. I have also enabled optimize website feature in cpanel.

Please advise

  • Adam Czajczyk
    • Support Gorilla

    Hello Sam

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

    I checked your site using Chrome’s developers tools, PageSpeed Insights and GTMetrix and it seems that compression is actually working so that part is fine.

    It seems then that Hummingbird gives a “false alert” and it can’t detect the compression. It’s worth knowing that Hummingbird itself does not perform gzip compression (no “optimization” kind of plugin does that in fact) as it’s a server-side thing. Hummingbird and other tool just let you enable/disable it and, often, also configure expiration time if this is allowed by the server.

    I’m not sure what the “optimize website” tool in your cPanel does but I suppose it’s also adding some additional rules to .htaccess so that might actually be conflicting if it comes to detection.

    However, before we go any further with this, please try following: clear all cache on site and on server (if there is any, you should see that in cPanel) and try re-checking status of the gzip compression in Hummingbird. If it still says the same, give it another hour or two and repeat that process.

    If that still shows that error message, would you please then enable support access to the site so I could take a closer look and check it? To do so, please go to the “WPMU DEV -> Support -> Support Access” page in site’s back-end and click on “Grant support access” button there and let me know here once it’s done as I will not be notified automatically.

    Best regards,

    Adam

  • Adam Czajczyk
    • Support Gorilla

    Hi Sam

    Thank you for letting me know and enabling access.

    I checked the site and noticed that it actually does show that gzip compression is enabled for two MIME types – Javascript and CSS – but it shows it as “inactive” only for HTML. There’s also this additional message which is important here:

    GZip compression is currently active for 2/3 types. We’ve detected you have Privacy Mode active which prevents us from accurately detecting whether HTML compression is active or not. You can re-check this when you’ve disabled Privacy Mode.

    It essentially says that Hummingbird actually doesn’t know if compression for HTML is enabled or not because it can’t check it due to “Privacy Mode”. The “Privacy Mode” in this case means that the site responds to the request with HTTP 401 status.

    The 401 status means “Unauthorized” access. That’s a bit strange though in this case because the check is a “self-check” – the site “calls itself” using WP built-in SimplePie library. So, it’s like the site would deny itself from calling itself. I know it sounds “twisted” but I’m not sure how to put it in a simpler way, I hope it makes some sense to you.

    Taking that into account, would you mind sharing content of your sites “.htaccess” file with me and also – if you do have a physically existing one – “robots.txt” file?

    I think the main goal now will be to find out what’s actually causing that “401” (unauthorized) response and that should solve the check issue.

    Best regards,

    Adam

  • Sam
    • Site Builder, Child of Zeus

    Hi,

    below you will find .htaccess, there is mp physically existing “robot.txt” file.

    Let me know if you need access to FTP.

    # BEGIN WordPress

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /new/

    RewriteRule ^index.php$ – [L]

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule . /new/index.php [L]

    </IfModule>

    # END WordPress

    ## WP Defender – Prevent information disclosure ##

    <FilesMatch “.(txt|md|exe|sh|bak|inc|pot|po|mo|log|sql)$”>

    Order allow,deny

    Deny from all

    </FilesMatch>

    <Files robots.txt>

    Allow from all

    </Files>

    <Files ads.txt>

    Allow from all

    </Files>

    ## WP Defender – End ##

    # BEGIN WP-HUMMINGBIRD-CACHING

    <IfModule mod_expires.c>

    ExpiresActive On

    ExpiresDefault A0

    <FilesMatch “.(txt|xml|js)$”>

    ExpiresDefault A691200

    </FilesMatch>

    <FilesMatch “.(css)$”>

    ExpiresDefault A691200

    </FilesMatch>

    <FilesMatch “.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$”>

    ExpiresDefault A691200

    </FilesMatch>

    <FilesMatch “.(jpg|jpeg|png|gif|swf|webp)$”>

    ExpiresDefault A691200

    </FilesMatch>

    </IfModule>

    <IfModule mod_headers.c>

    <FilesMatch “.(txt|xml|js)$”>

    Header set Cache-Control “max-age=691200”

    </FilesMatch>

    <FilesMatch “.(css)$”>

    Header set Cache-Control “max-age=691200”

    </FilesMatch>

    <FilesMatch “.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$”>

    Header set Cache-Control “max-age=691200”

    </FilesMatch>

    <FilesMatch “.(jpg|jpeg|png|gif|swf|webp)$”>

    Header set Cache-Control “max-age=691200”

    </FilesMatch>

    </IfModule>

    # END WP-HUMMINGBIRD-CACHING

    # BEGIN WP-HUMMINGBIRD-GZIP

    <IfModule mod_deflate.c>

    SetOutputFilter DEFLATE

    <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-font-opentype”

    “application/x-font-truetype”

    “application/x-javascript”

    “application/x-web-app-manifest+json”

    “application/xhtml+xml”

    “application/xml”

    “font/eot”

    “font/opentype”

    “font/otf”

    “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>

    # END WP-HUMMINGBIRD-GZIP

  • Predrag Dubajic
    • Support

    Hi Sam,

    Apologies for the delay, we have been a bit short staffed for a couple of days and we’re doing our best to bring things back to normal.

    It seems to me that the rules in there do look good so we would like to have a closer look if you can provide us with FTP or cPanel access.

    Note: Don’t leave your login details in this ticket.

    Instead, you can send us your details using our contact form https://premium.wpmudev.org/contact/#i-have-a-different-question and the template below:

    NOTE: Don’t change the selected topic in the dropdown, just leave it at “I have a different question”.

    Subject: “Attn: Predrag Dubajic

    – Site login URL

    – WordPress admin username

    – WordPress admin password

    – FTP credentials (host/username/password)

    – cPanel credentials (host/username/password)

    – Folder path to site in question

    – Link back to this thread for reference

    – Any other relevant urls/info

    Best regards,

    Predrag

  • Adam Czajczyk
    • Support Gorilla

    Hello Sam

    Thanks for providing credentials!

    I checked the site and server again and also consulted it with Hummingbird’s lead developer. It seems that all’s fine there except for that single compression check only.

    As mentioned earlier, it seems that the server is, for some reason, rejecting pretty much “its own” requests for HTTP headers that are performed by Hummingbird to check if compression is enabled. We can’t see any reason for this related to site configuration and nothing on server that could be found via cPanel and/or WP files there.

    The bottom line is: there are two things that could be done now. One would be to simply ignore that check and consider it a false alarm (which it, in fact, really is). The other one would be trying to find out why server is rejecting that “check connection”. If you’d like to go this way, I think you might want to talk more to your host and ask them to check why/what reason for the server is rejecting queries like this with 401 status (this is taken from ssl access log on your server)

    [03/Jul/2019:04:52:12 -0400] "GET / HTTP/1.1" 401 35 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:47.0) Gecko/20100101 Firefox/47.0"

    I think, however, that you might just safely ignore that warning as it’s a “false alarm”.

    Kind regards,

    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.