Just to add a bit more context to this problem. I recently turned on analytics on my site remysharp.com to analyse where the bandwidth was being chewed up.
Just looking at the top not found URL:
Obviously this is bad (and the reason I turned on analytics was to catch these unknown 404s) and I’ll fix this going forward.
But the cost to Netlify and myself has been: 34,133 x 35Kb (the size of the uncompressed redirected 404 page): ~1.1Gb of bandwidth per month.
With gzip enabled, this bandwidth would have been ~510Mb. This is large to me, but small to Netlify on the microscale, but should be obvious when we think of all the other sites Netlify hosts and the redirects in place that aren’t compressed.
Even if you ignore the fact I have a bloated 404 page (yes!), the default Netlify page is also uncompressed.
# regular curl with compression doesn't get a gzip header back
$ curl --compress https://ffconf.org/__XXXXX___ -I -X GET
HTTP/1.1 404 Not Found
Cache-Control: public, max-age=0, must-revalidate
Content-Type: text/html; charset=utf-8
Date: Tue, 23 Jul 2019 09:41:14 GMT
# current site
$ curl --compress https://ffconf.org/__XXXXX___ | wc -c
# potential size
$ curl --compress https://ffconf.org/__XXXXX___ | gzip | wc -c
You’re looking at saving 55% of the current bandwidth spent on redirected 404s. I can imagine that amounts to real money.