How to Enable Gzip Compression Without Plugin

Hey all, since I’m just getting started here I thought I’d make some posts outlining some of the SEO changes I do to this very site, as I’m doing them. First and foremost is making the site load as fast as possible.

For starters, insert this code into the .htaccess of your website. This is assuming you have an Apache web server (Litespeed, Nginix, or Windows won’t work) and save. The next time your site loads, most of your files will transfer much quicker, as they will be compressed.

<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*

Stay tuned for mor!


I’m just getting started, stay tuned!