HTTP/3, built on QUIC (a UDP-based transport protocol), eliminates head-of-line blocking, reduces connection setup time to zero round trips for repeat visitors, and handles network switching (Wi-Fi to cellular) seamlessly. As of 2025, HTTP/3 is supported by all major browsers and accounts for over 30% of web traffic. This guide covers enabling HTTP/3 on various web servers.
Why HTTP/3 Matters
- 0-RTT connections: Returning visitors connect with zero round trips (vs 2-3 RTT for HTTP/2+TLS)
- No head-of-line blocking: Lost packets on one stream don't block other streams (unlike HTTP/2 over TCP)
- Connection migration: Connections survive network changes (mobile users switching networks)
- Improved loss recovery: QUIC has better congestion control than TCP
- Mandatory encryption: TLS 1.3 built into the protocol
HTTP/3 with Nginx
Nginx supports QUIC/HTTP3 natively since version 1.25.0:
# Ensure Nginx is compiled with QUIC support
nginx -V 2>&1 | grep -o 'http_v3_module'
# If not, install from Nginx mainline repo or compile
# Ubuntu
sudo add-apt-repository ppa:ondrej/nginx-mainline
sudo apt update && sudo apt install nginx
# /etc/nginx/conf.d/example.conf
server {
# HTTP/1.1 and HTTP/2 on TCP
listen 443 ssl;
http2 on;
# HTTP/3 on QUIC (UDP)
listen 443 quic reuseport;
server_name example.com;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
ssl_protocols TLSv1.3;
# Advertise HTTP/3 availability
add_header Alt-Svc 'h3=":443"; ma=86400';
# QUIC-specific settings
ssl_early_data on;
quic_retry on;
# Enable 0-RTT
proxy_set_header Early-Data $ssl_early_data;
location / {
root /var/www/html;
index index.html;
}
}
Firewall Configuration
# QUIC uses UDP port 443 — most firewalls only open TCP 443
sudo ufw allow 443/udp
# Or with iptables
sudo iptables -A INPUT -p udp --dport 443 -j ACCEPT
HTTP/3 with Caddy
Caddy enables HTTP/3 by default with zero configuration:
# Caddyfile — HTTP/3 is automatic
example.com {
root * /var/www/html
file_server
}
# HTTP/3 is enabled by default when serving HTTPS
# Caddy automatically provisions certificates via Let's Encrypt
# Alt-Svc headers are added automatically
HTTP/3 with LiteSpeed
# LiteSpeed (OpenLiteSpeed and Enterprise) has native QUIC/HTTP3 support
# It's enabled by default — just verify in the admin panel:
# Configuration > Server > Tuning > Enable HTTP/3/QUIC: Yes
# Or in httpd_config.conf
enableQuic 1
quicVersions Q046,Q050,h3-29,h3
Testing HTTP/3 Support
# Test with curl (needs HTTP/3 support compiled in)
curl --http3-only -I https://example.com
# Look for: HTTP/3 200
# If curl doesn't support HTTP/3, use:
# 1. Browser DevTools: Network tab → Protocol column shows "h3"
# 2. Online tools: https://http3check.net
# 3. Cloudflare's HTTP/3 test: enabled by default on CF proxy
# Test with quiche-client
cargo install quiche
quiche-client https://example.com/
Performance Measurement
# Compare HTTP/2 vs HTTP/3 page load times
# HTTP/2 (TCP)
curl -o /dev/null -w "TTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n" \
--http2 https://example.com
# HTTP/3 (QUIC)
curl -o /dev/null -w "TTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n" \
--http3-only https://example.com
# Typical improvements:
# First visit: 10-30% faster TTFB (fewer round trips)
# Repeat visit: 20-50% faster (0-RTT)
# High packet loss: 2-5x faster (no head-of-line blocking)
Cloudflare HTTP/3
# If using Cloudflare proxy, HTTP/3 is a single toggle
# Dashboard > Speed > Optimization > Protocol Optimization > HTTP/3
# Cloudflare handles:
# - QUIC negotiation with browsers
# - Alt-Svc header injection
# - UDP termination at edge
# - Fallback to HTTP/2 for unsupported clients
# Your origin can remain HTTP/1.1 or HTTP/2
# The HTTP/3 benefit is client-to-edge only
Advanced QUIC Tuning
# Nginx QUIC tuning
# Increase QUIC buffer sizes for high-bandwidth connections
quic_gso on; # Generic Segmentation Offload for better throughput
# UDP buffer sizes (kernel level)
sudo sysctl net.core.rmem_max=2500000
sudo sysctl net.core.wmem_max=2500000
# Increase UDP receive buffer
sudo sysctl net.core.rmem_default=2500000
Client Compatibility
HTTP/3 support as of 2025:
- Chrome: Full support since Chrome 87 (2020)
- Firefox: Full support since Firefox 88 (2021)
- Safari: Full support since Safari 16 (2022)
- Edge: Full support (Chromium-based)
- curl: Requires compilation with nghttp3/quiche/ngtcp2
- Mobile: Android and iOS browsers all support HTTP/3
HTTP/3 is always negotiated via Alt-Svc headers, so unsupported clients transparently fall back to HTTP/2 or HTTP/1.1. There is zero risk of breaking compatibility.
Summary
HTTP/3 provides meaningful performance improvements, especially for mobile users, high-latency connections, and repeat visitors benefiting from 0-RTT. If you use Cloudflare, enable it with a single click. For self-hosted servers, Caddy enables it automatically, LiteSpeed has it built in, and Nginx 1.25+ supports it natively. The key operational change is ensuring UDP port 443 is open in your firewall — everything else is backward-compatible with existing HTTP/2 and HTTP/1.1 clients.