I’ve been advised to use Brotli (like gzip) to compress my site.
I use Blocs as I felt it needed little more input past the design and publishing.
Now I seem to need to know how to compress files, and other issues I have no understanding of.
Does anyone have an idiots guide on site compression?
I’ve read online, but it starts saying add code here and there and I cant find them on my radar!!

I’ve been advised to use the following rule

RewriteEngine On
RewriteCond %{HTTP_HOST} ^$ [OR]
RewriteCond %{HTTPS} !on
RewriteRule ^(.*)$$1 [R,L]

(I think it’s in Latin) :thinking:

Thanks in advance for any help, Andy

Don’t panic, it’s not that complicated :wink:

With Blocs, just export the pages with minification enabled, which removes unnecessary spaces in the code and this is a good start. At a server level you can enable compression and if Brotli is not available Gzip is a perfectly good alternative.

All that happens here is that site contents are compressed by the server, then decompressed by the browser as the files are downloaded and this is no problem for any modern setup. The big upside is that it can reduce the overall download by a substantial amount, leading to faster page opening. N.B No need to compress images, since they are already compressed in their own format e.g Jpeg and further compression can actually make them slower.

For the page redirects that looks OK at first glance, though you should test it. I always drive everything to https:// so I use the following:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)
RewriteRule ^.*$ https://%1/$1 [R=301,L]

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

There are different variations on how to do this and Google will usually offer alternatives. This should go inside the .htaccess file on your server at the root level.