HTTP/2 and HTTP/3
HTTP/2 and HTTP/3 are protocol versions that govern how browsers and servers exchange requests and responses. They do not change HTML or PHP. What changes is how data travels over the network.
The core differences
| Protocol | Transport | Main feature |
|---|---|---|
| HTTP/1.1 | TCP | One request per connection at a time, often needs many connections |
| HTTP/2 | TCP | Multiplexes many requests over one connection, header compression |
| HTTP/3 | QUIC over UDP | Multiplexing without TCP head-of-line blocking, faster handshake |
HTTP/2 reduces the need to open many connections. HTTP/3 brings multiplexing to QUIC, so losing one packet does not automatically hold up every stream as it can with TCP. But HTTP/3 is not automatically faster for every site.
How to check
In DevTools, open Network, enable the Protocol column, and reload the page. You will see h2 or h3. From the terminal, curl -I --http2 https://example.com and curl -I --http3 https://example.com can show the protocol, depending on your curl version.
If the server does not support HTTP/2 yet, prioritize HTTPS and caching before changing protocols. A CDN is usually the fastest way to enable HTTP/2 and HTTP/3 without changing the origin.
Benefits and limits
Multiplexing helps most on pages with many assets and high-latency connections. On a page that loads one small file, the difference is barely noticeable.
HTTP/2 and HTTP/3 are also not a replacement for image optimization, caching, or database tuning. If LCP is poor because the hero image is huge, a newer protocol will not fix it. For speed context, see Core Web Vitals.
What to watch for
Enable HTTPS first. Most HTTP/2 implementations require it, and HTTP/3 also runs over TLS. Make sure no mixed content breaks the secure connection.
Some networks block UDP, so HTTP/3 falls back to HTTP/2 or HTTP/1.1. That is normal. Test from several networks and monitor errors at the CDN.
For server configuration, see Web Server. For CDN, see CDN. For transport security, see HSTS. If the issue is HTTP to HTTPS, see HTTP vs HTTPS.
Server push was once treated as a key HTTP/2 feature, but many browsers have removed it because it was often misused. Prioritize preload and fetchpriority for important assets instead. If a CDN uses HTTP/3, it usually sends an Alt-Svc header to tell the browser to try the new protocol on the next connection.
FAQ
Is HTTP/3 always faster than HTTP/2?
No. On poor networks, QUIC can be better. On stable networks and small pages, the difference is often imperceptible.
Is HTTP/2 required for SEO?
Not directly. PageSpeed affects user experience, and HTTP/2 can help sites with many assets.
Why does my browser use h2 instead of h3?
HTTP/3 needs server or CDN support and UDP that is not blocked by the network. The browser picks the protocol that is available.
Disclaimer: Hosting Wiki articles are prepared for educational and reference purposes. Hosting technology keeps evolving, so some technical details may change over time.