h2, h2c, or HTTP/1.1? Practical Choices for Your Web Stack

Illustrated infographic summarizing: h2, h2c, or HTTP/1.1? Practical Choices for Real-World Stacks

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.
Different protocols can coexist. Each connection needs a supported configuration and an owner.

Apache: make the intended behaviour explicit

With mod_http2 loaded, add this to an existing TLS virtual host:

Protocols h2 http/1.1

For a separate, controlled cleartext virtual host requiring prior-knowledge HTTP/2:

Protocols h2c http/1.1
H2Direct on
H2Upgrade off

H2Direct 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/health

curl -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.com

The 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

  1. Map ownership. Record intermediaries, TLS termination points and responsible teams.
  2. Capture a baseline. Measure errors, timeouts, memory, connection counts and p95 latency—the response time within which 95% of requests complete.
  3. Change one connection. Validate configuration, retain a rollback copy and agree which deterioration triggers reversal.
  4. Exercise business journeys. Test login, forms, checkout, uploads, APIs and streaming under representative concurrency.
  5. 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

Need help with this kind of work?

Talk with Greg about your web stack Get in touch with Greg.

Sources

Latest articles

See how SharePoint access changes reach internal AI search, and test how long revoked content can still appear in results, generated answers, and citations.

At month-end, reconcile Shopify Payments against your bank statement and e-conomic. Use the payout ID to trace fees, refunds, and payouts that reach your bank the following month.

Trace an intermittent NGINX 502 through Cloudflare, upstream attempts, and application logs so you can see where the request failed and who should pick it up.

Find the apps, scripts and printers that still send mail through Microsoft 365 with a mailbox password, then test a replacement before the December 2026 change.

Find subscriptions and insurance expenses in e-conomic that should be spread over several months. See how AI reads the supporting documents and how your finance lead approves the proposed allocations.

Before relying on an AI project briefing, check which files it covered. A practical workflow for tracking documents, recording gaps and verifying key claims.

Check whether your contact form rejects missing or invalid Turnstile tokens, handles failed checks for genuine users and delivers accepted enquiries to your team.

Compare Bing citations, identifiable AI visits and verified enquiries to see which pages deserve attention before you increase your AI search marketing budget.

Teamtailor is phasing out Riminder on 21 November 2026. Check your parser settings, contact fields and integrations, and make sure you have a process for deleting applicant data.

WordPress jobs running late? Learn how to separate scheduling problems, task errors and a growing backlog, then choose the right scheduler or runner.