How to Enable HTTP/2 or HTTP/3 on Your Website or CDN
If your HTTPS server only negotiates HTTP/1.1, browsers and crawlers download your pages over an older protocol that handles only one request at a time per connection. By the end of this guide your server or CDN will negotiate HTTP/2 during the TLS handshake, optionally advertise HTTP/3 through an Alt-Svc header, and you will have confirmed both from the command line.

Why it matters
HTTP/2 multiplexes many requests over one connection and compresses headers, which cuts the waiting time for CSS, JavaScript, fonts and images on pages with many assets. HTTP/3 runs over QUIC and recovers faster on lossy mobile networks. This helps Core Web Vitals such as LCP, but it is not a direct ranking factor.
Googlebot can also crawl eligible sites over HTTP/2, which uses fewer connections to your server. The change is usually a one-line configuration or a single dashboard toggle, so the effort is small.
What you need
Step-by-step fix
Check what your site negotiates today
Run both commands against your homepage. The first shows which protocol the TLS handshake agrees on through ALPN. The second shows whether HTTP/3 is advertised in an Alt-Svc header.
- If you see
ALPN protocol: h2, HTTP/2 already works. - If you see
No ALPN negotiatedorhttp/1.1, HTTP/2 is off. - If there is no TLS connection at all, fix HTTPS first. This check only applies to HTTPS sites.
openssl s_client -connect example.com:443 -servername example.com -alpn h2,http/1.1 </dev/null 2>/dev/null | grep -i alpn curl -sI https://example.com/ | grep -i alt-svc
Find where TLS is terminated
HTTP/2 is negotiated by whichever system holds your certificate and answers on port 443. That could be your origin web server, a load balancer such as AWS ALB or a hosting proxy, or a CDN such as Cloudflare or Fastly. com/` and look at the response headers to see what is in front of your server.
server: cloudflare or a cf-ray header means Cloudflare, and via or x-served-by often indicates a CDN. Change the setting at that layer. Changing the origin does nothing if a proxy terminates TLS in front of it.
Enable HTTP/2 on Nginx
Edit the server block that listens on 443, usually in /etc/nginx/sites-available/ or /etc/nginx/conf.d/.
- On Nginx 1.25.1 and later, use the separate
http2 on;directive. - On older versions, add
http2to thelistenline instead.
Run nginx -v to check your version. Then test the config and reload.
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on; # Nginx 1.25.1+
# listen 443 ssl http2; # use this form on older Nginx
server_name example.com www.example.com;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
}
# then:
# sudo nginx -t && sudo systemctl reload nginxEnable HTTP/2 on Apache
Apache needs mod_http2 and the event or worker MPM. With mpm_prefork, HTTP/2 is effectively unusable, and that is the usual reason it seems to be ignored. conf`.
3` with your installed PHP version.
sudo a2enmod http2 sudo a2dismod php8.3 mpm_prefork sudo a2enmod mpm_event proxy_fcgi setenvif sudo a2enconf php8.3-fpm # In <VirtualHost *:443> or apache2.conf: Protocols h2 http/1.1 sudo apachectl configtest && sudo systemctl restart apache2
Or switch it on at your CDN or load balancer
If a CDN or load balancer terminates TLS, enable the protocol there instead.
- Cloudflare: HTTP/2 to visitors is on by default. Enable HTTP/3 under Speed > Settings > Protocol Optimization > HTTP/3 (with QUIC). On some accounts the toggle appears under Network.
- AWS Application Load Balancer: go to EC2 > Load Balancers > (your ALB) > Attributes > Edit and make sure HTTP/2 is enabled (
routing.http2.enabled = true). - CloudFront: open your distribution, choose Edit in General settings, and under Supported HTTP versions select HTTP/2 and HTTP/3.
aws elbv2 modify-load-balancer-attributes --load-balancer-arn <your-alb-arn> --attributes Key=routing.http2.enabled,Value=true
Optionally add HTTP/3 and the Alt-Svc header
Browsers find HTTP/3 through an Alt-Svc response header. That header alone is enough to pass this check, but only add it once QUIC actually works.
- On Nginx 1.25+, the build must include the http_v3 module. Run
nginx -V 2>&1 | grep http_v3to check. - Add a
quiclistener and enable TLS 1.3. - Open UDP port 443 in your firewall and any cloud security group.
- Use the
alwaysparameter so the header is sent on every response.
server {
listen 443 ssl;
listen 443 quic reuseport;
listen [::]:443 ssl;
listen [::]:443 quic reuseport;
http2 on;
http3 on;
ssl_protocols TLSv1.2 TLSv1.3;
add_header Alt-Svc 'h3=":443"; ma=86400' always;
}
# firewall:
# sudo ufw allow 443/udpReload and verify the result
Clear any CDN cache for the homepage, then re-run the checks from step 1. You should see ALPN protocol: h2, and if you set up HTTP/3, an alt-svc header containing h3. Use curl to print the HTTP version actually used.
Then re-run the site audit.
curl -sI --http2 https://example.com/ -o /dev/null -w '%{http_version}\n' # expect: 2
openssl s_client -connect example.com:443 -servername example.com -alpn h2 </dev/null 2>/dev/null | grep -i alpn
curl -sI https://example.com/ | grep -i alt-svc
# HTTP/3 test (curl built with HTTP/3 support):
curl -sI --http3-only https://example.com/ -o /dev/null -w '%{http_version}\n' # expect: 3Platform-specific notes
WordPress
This depends on your host, not a plugin. Most managed hosts and LiteSpeed-based shared hosts already serve HTTP/2 and often HTTP/3. On cPanel with Apache, ask the host to enable mod_http2 with mpm_event. Alternatively, put the site behind Cloudflare, which serves HTTP/2 and HTTP/3 at the edge.
Shopify, Wix, Squarespace, Webflow
These platforms serve sites over HTTP/2 and typically advertise HTTP/3 through their CDN, and there is no setting to change. If the audit still flags the site, check whether a third-party proxy or custom DNS setup sits in front of the platform.
Cloudflare
HTTP/2 to visitors is always on. Enable HTTP/3 under Speed > Settings > Protocol Optimization. HTTP/2 to Origin is a separate option and does not affect this check. If DNS records are grey-clouded (DNS only), Cloudflare is not proxying and your origin must support HTTP/2 itself.
Next.js / Node.js
On Vercel or Netlify, HTTP/2 and HTTP/3 are automatic. If you self-host `next start` or Express, put Nginx, Caddy or a load balancer in front to terminate TLS and handle HTTP/2. Caddy enables HTTP/2 and HTTP/3 by default.
IIS (Windows Server)
HTTP/2 over TLS is on by default from Windows Server 2016 and IIS 10. HTTP/3 needs Windows Server 2022 and an EnableHttp3 registry value under HKLM\SYSTEM\CurrentControlSet\services\HTTP\Parameters, plus an Alt-Svc header added in IIS Manager > HTTP Response Headers.
Check that it worked
✅ How to verify
- Run `openssl s_client -connect example.com:443 -servername example.com -alpn h2` and confirm the output includes "ALPN protocol: h2".
- Run `curl -sI --http2 https://example.com/ -o /dev/null -w '%{http_version}'` and confirm it prints 2.
- Open Chrome DevTools > Network, right-click a column header, enable "Protocol", reload, and check that the document shows h2 or h3.
- If you enabled HTTP/3, run `curl -sI https://example.com/ | grep -i alt-svc` and confirm the header contains h3, then re-run the audit.
⚠️ Common mistakes
- Changing the origin server while a CDN or load balancer terminates TLS in front of it, so visitors still get HTTP/1.1.
- Enabling mod_http2 on Apache while mpm_prefork is still active, so HTTP/2 never works in practice.
- Sending an Alt-Svc h3 header without opening UDP 443 or enabling TLS 1.3. Browsers try QUIC, fail, and fall back, which adds latency.
- Enabling only h2c (cleartext HTTP/2) on port 80. Browsers never use it, so the HTTPS connection stays on HTTP/1.1.
Is this still an issue on your site? Run a free audit — ZORO checks this and 294 other SEO, AI-visibility, accessibility and security signals, with fixes for your platform.
Check my site freeFAQ
Is HTTP/2 a Google ranking factor?
Not directly. Google has said the crawl protocol does not affect ranking. HTTP/2 can improve page speed metrics such as LCP, and those are part of page experience signals. Googlebot can also crawl eligible sites over HTTP/2, which uses fewer connections.
Does HTTP/2 require HTTPS?
Browsers only use HTTP/2 over TLS, negotiated through ALPN. Cleartext h2c exists but is not used by Chrome, Firefox or Safari. You need a valid certificate first.
Should I enable HTTP/3 or is HTTP/2 enough?
HTTP/2 is enough to pass this check. HTTP/3 mainly helps mobile users on unstable networks and is a one-click toggle on most CDNs. On a self-managed server it needs QUIC support and an open UDP port, so add it when that is practical.
Do I still need to bundle files or shard domains with HTTP/2?
Domain sharding is counterproductive under HTTP/2 because it splits the single multiplexed connection. Moderate bundling is still fine, but you no longer need to combine everything into one file to save requests.
How to Fix Broken AMP Pages and rel="amphtml" Link Errors
How to Fix Slow DNS Response Time for Your Website
How to Fix Uppercase Characters in URLs (and Redirect Them)
How to Fix Server Uptime: Monitor and Reach 99.9%+
How to Fix Underscores in URLs: Switch to Hyphens Safely
How to Fix Missing Security Headers (CSP, Referrer-Policy)