By Greg Nowak. Last updated 2026-11-12.
A website can serve visitors over HTTP/2 while its application receives HTTP/1.1 requests. That can be a sensible setup. The important question is whether your hosting provider, developers and agency can explain the whole request path—and test it when something changes.
My starting recommendation: offer HTTP/2 over HTTPS for public traffic, retain HTTP/1.1 compatibility, and choose internal protocols according to application support and measured need. For business owners and operations leads, the aim is reliable forms, checkouts and APIs, with someone responsible for each connection.
What is the difference between h2, h2c and HTTP/1.1?
h2 is HTTP/2 over TLS. The client and server select it through ALPN during the TLS handshake. HTTP/2 lets concurrent requests share a connection and compresses headers, reducing some connection overhead.
h2c commonly means cleartext HTTP/2. It provides no TLS encryption itself. For new deployments, use prior knowledge: both endpoints are configured to speak HTTP/2 immediately. RFC 9113 deprecated the older Upgrade: h2c route, where communication begins as HTTP/1.1. Cleartext HTTP/2 itself remains supported by the HTTP/2 specification.
HTTP/1.1 remains a reasonable application connection. It can also use HTTPS. A quiet backend with working connection reuse may gain little from HTTP/2; slow database queries and cache misses still need their own fixes.
For an ordinary public website, choose HTTPS with h2 support. Reserve cleartext HTTP/2 for controlled connections with a documented reason and appropriate protection. An internal hostname alone does not establish that protection.
Choose a protocol for each connection
A CDN can accept one protocol and use another towards your origin server. Browser developer tools show the visitor-facing connection, so ask your providers to confirm the remaining connections separately.
| Connection | Practical starting point | What to check |
|---|---|---|
| Visitor to CDN or web server | h2 over HTTPS, with HTTP/1.1 compatibility | Certificates and actual protocol negotiation. |
| CDN to origin | Supported HTTP/1.1 or h2 over HTTPS | Provider settings, certificate validation and origin errors. |
| Proxy to application | Keep working HTTP/1.1; test HTTP/2 where useful | Application support, connection reuse and concurrent traffic. |
| Controlled internal service | h2; cleartext HTTP/2 only with justification | Path protection and prior-knowledge support. |
| Legacy application or appliance | HTTP/1.1 where required | Vendor constraints, timeouts and connection limits. |
Apache: make the intended behaviour explicit
With mod_http2 loaded, add this to an existing TLS virtual host:
Protocols h2 http/1.1For a separate, controlled cleartext virtual host requiring prior-knowledge HTTP/2:
Protocols h2c http/1.1
H2Direct on
H2Upgrade offH2Direct accepts the HTTP/2 connection preface immediately. H2Upgrade off disables the older upgrade mechanism; check existing clients before removing something they rely on.
The Apache module documentation highlights additional worker threads and memory use, so monitor both under load. Virtual hosts sharing certificates also need consistent TLS settings: mismatches can produce 421 Misdirected Request when clients reuse connections across hostnames.
NGINX: visitor HTTP/2 and upstream HTTP/2 are separate
Check your installed version with nginx -v. For NGINX 1.25.1 and later, these lines belong inside an existing HTTPS server block alongside its certificate configuration:
listen 443 ssl;
http2 on;Older configurations commonly use listen 443 ssl http2;. The HTTP/2 module documentation also marks http2_push and http2_push_preload obsolete; review stale push settings during maintenance.
Enabling visitor HTTP/2 does not change the connection to your application. Generic HTTP proxying gained HTTP/2 support in 1.29.4 and requires the HTTP/2 module. In a compatible proxy location, select it with:
proxy_http_version 2;Keep the existing proxy_pass destination and review encryption separately. HTTP/1.1 became the proxy default in 1.29.7; earlier versions defaulted to HTTP/1.0. Check effective settings before assuming connection reuse works as intended.
For HTTPS upstreams, NGINX disables certificate verification by default. Configure proxy_ssl_verify on;, trusted CA certificates, and the appropriate certificate name and SNI settings. The proxy module documentation explains these controls. These snippets are changes to existing configurations, not complete server definitions.
Test the protocol that actually negotiated
Replace the example hostnames with your own endpoints:
curl -V
curl -sS -o /dev/null -w '%{http_version}\n' https://example.com
curl --http1.1 -sS -o /dev/null -w '%{http_version}\n' https://example.com
curl --http2 -sS -o /dev/null -w '%{http_version}\n' https://example.com
curl --http2-prior-knowledge http://internal-service:8080/healthcurl -V should list HTTP2 support. The HTTPS checks print the negotiated version. A successful --http2 request alone proves little: negotiation can fall back to HTTP/1.1. The final command assumes a cleartext endpoint configured for HTTP/2 immediately.
With curl 8.10.0 or later, this HTTPS test offers only HTTP/2 through ALPN; still inspect the reported version:
curl --http2-prior-knowledge -sS -o /dev/null -w '%{http_version}\n' https://example.comThe curl manual documents the version-dependent behaviour. Repeat checks at accessible internal boundaries and corroborate them with proxy logs. A homepage request does not test authentication, submissions or uploads.
Agree what success looks like before changing production
- Map ownership. Record intermediaries, TLS termination points and responsible teams.
- Capture a baseline. Measure errors, timeouts, memory, connection counts and p95 latency—the response time within which 95% of requests complete.
- Change one connection. Validate configuration, retain a rollback copy and agree which deterioration triggers reversal.
- Exercise business journeys. Test login, forms, checkout, uploads, APIs and streaming under representative concurrency.
- Keep the evidence. Document results, chosen settings, verification commands and the ongoing owner.
If your hosting provider, agency and developers need help agreeing the next step, Greg can map the request path, assess the options and coordinate a tested rollout. Talk with Greg about your web stack.
Related on GrN.dk
- NGINX 1.30 and upstream connection reuse: what to check before upgrading
- A stray Set-Cookie can waste your CDN: audit the cache at the edge
- JavaScript-Heavy Service Pages Still Lose Leads: What to Audit in 2026
Need help with this kind of work?
Talk with Greg about your web stack Get in touch with Greg.