HTTP/2 and HTTP/3: Load Pages over Modern Protocols
HTTP/1.1, the version the web ran on for two decades, handles one request at a time per connection. Browsers work around it by opening up to six connections per host, but pages with dozens of scripts, styles, fonts and images still end up waiting in line. HTTP/2 and HTTP/3 send many requests at once over a single connection.
Why it matters
- HTTP/2 multiplexes requests over one TCP connection and compresses headers. Pages with many small files load noticeably faster, and you no longer need tricks like domain sharding or spriting.
- HTTP/3 runs over QUIC instead of TCP. A lost packet no longer stalls every request on the connection, and connections set up faster. The gains are largest on mobile and lossy networks.
Every modern browser supports both. Servers fall back to HTTP/1.1 for clients that don’t.
What we check
We look at two things:
- the protocol negotiated during our TLS handshake (ALPN):
h2means HTTP/2; - the
Alt-Svcresponse header:h3=":443"means the server offers HTTP/3.
| Result | When |
|---|---|
| Passed (HTTP/3) | Alt-Svc advertises h3 |
| Passed (HTTP/2) | the TLS handshake negotiates h2 |
| Needs attention | only HTTP/1.1 is available |
| Couldn’t test | the site isn’t reachable over HTTPS |
HTTP/2 in browsers always runs over HTTPS, so fix HTTPS first if that check fails.
How to fix
CDN
Cloudflare, Fastly, CloudFront, Akamai, Vercel and Netlify serve HTTP/2 by default, and most offer HTTP/3 as a switch (Cloudflare: Speed > Optimization > Protocol Optimization). Because the CDN terminates the connection, your origin can stay on HTTP/1.1.
Nginx
On Nginx 1.25.1 and later:
server {
listen 443 ssl;
http2 on;
# ...
}
Older versions use listen 443 ssl http2;. HTTP/3 needs Nginx 1.25 or later built with QUIC
support:
listen 443 quic reuseport;
add_header Alt-Svc 'h3=":443"; ma=86400' always;
Open UDP port 443 in your firewall, since QUIC runs over UDP.
Apache
Enable mod_http2 and add:
Protocols h2 http/1.1
Apache doesn’t serve HTTP/3 itself; put a CDN or a QUIC-capable proxy in front if you want it.
After enabling
Bundling everything into one huge file was an HTTP/1.1 optimization. Under HTTP/2, a few well-cached files that change independently usually work better.
Further reading: web.dev: Introduction to HTTP/2 and MDN: Alt-Svc.