Fixing CloudFront HTTP/2 Configuration
December 15, 2025
While reviewing a GTmetrix performance report, I noticed unusually high server
response times despite having an A-grade score. The HAR file revealed that all
resources were being served over HTTP/1.1 instead of HTTP/2, even though I
believed HTTP/2 had been enabled previously. I queried my CloudFront
distribution using the AWS CLI and confirmed the HttpVersion setting was
indeed set to http1.1. I updated the distribution configuration to use HTTP/2,
which enables multiplexing (allowing multiple requests over a single connection)
and binary header compression. After the change propagated to CloudFront's edge
locations, I ran a second GTmetrix test. The results were striking: Largest
Contentful Paint dropped from 690ms to 167ms, Time to First Byte collapsed from
386ms to under 5ms, and the fully loaded time fell from 2 seconds to just 193ms.
The improvement came from two factors working together: HTTP/2's multiplexing
eliminated connection overhead, and the warmed CloudFront cache meant all
resources were served directly from the edge location without origin fetches.
Recent Entries
- Packets to a Silent Modem December 14, 2025
- Suzanne Lanza December 13, 2025
- Bridget Hall December 12, 2025