PageSpeed fix guide ·

Modern HTTP (Use HTTP/2): how to move your site to HTTP/2 and HTTP/3

Modern HTTP, the Lighthouse 13 insight that replaced Use HTTP/2, means some of your files arrive over the old HTTP/1.1 protocol, which loads only a few files at a time from each server. The fix is a server or CDN that speaks HTTP/2 or HTTP/3. For most stores that's a hosting or CDN setting, not a WordPress one.

In Lighthouse
Modern HTTP
Older name
Use HTTP/2
In a FlashMax report
An old connection protocol

8.6% of the 40,951 WooCommerce stores FlashMax tested have this problem. See the study

The short fix

  1. Check the Protocol column in Chrome DevTools to see which files use http/1.1.
  2. If your own domain is on http/1.1, ask your host to enable HTTP/2 (it needs HTTPS).
  3. Or put a CDN that offers HTTP/2 and HTTP/3 in front of the site.
  4. For files on other domains, replace or remove the service that serves them over HTTP/1.1.
  5. Re-test and confirm h2 or h3 for your files.

What the warning is telling you

Lighthouse 13 moved the old audit Use HTTP/2 (shown as "Does not use HTTP/2 for all of its resources") into an insight called Modern HTTP. It flags files served over HTTP/1.1 or older, but only from a server that sends at least 6 static files to the page, since below that the difference is small. Local test servers are ignored.

Chrome's documentation notes that this insight isn't available in PageSpeed Insights, so you won't see it there. It appears in Lighthouse run from Chrome DevTools or the command line.

FlashMax runs Lighthouse 13 and shows the same check as the card An old connection protocol.

Why HTTP/1.1 slows the page

Over HTTP/1.1, most browsers open up to six connections to one site, so only about six files load at once and the rest wait in a queue. HTTP/2 sends many files in parallel over one connection, a feature called multiplexing, so the browser can request every file the moment it finds it. HTTP/3 does the same over QUIC, which runs on UDP instead of TCP: when a packet is lost, only the file it belonged to waits, not every file on the connection.

The median WooCommerce home page in our study made 113 requests, so the queue adds up. It delays the files that build the page, including the main image, which is why this mainly affects Largest Contentful Paint (25% of the Lighthouse score).

How common it is

In our study of 40,951 WooCommerce stores, 8.6% (3,507 stores) got this card. Their median phone score was 50, against 53 for stores without it. That is a correlation, not proof: stores with one problem usually have others too. See the WooCommerce speed study.

How to see which protocol your files use

In Chrome DevTools, open the Network panel, right-click the column headers and turn on Protocol, then reload. h2 means HTTP/2, h3 means HTTP/3, and http/1.1 is what the warning is about. Turn on the Domain column too, to see whether the files come from your own server or another one.

The FlashMax test lists the flagged files. From a terminal, this prints the protocol the server agreed to:

curl -s -o /dev/null -w "%{http_version}\n" https://example.com/

2 or 3 is fine; 1.1 means the server didn't offer HTTP/2.

How to fix it on WordPress and WooCommerce

No WordPress plugin can switch the protocol: it's decided by the web server or the CDN in front of it.

  • Ask your host to enable HTTP/2 on the server. Browsers use HTTP/2 only over HTTPS, so the site needs a valid certificate first.
  • Use a CDN. web.dev notes that a CDN likely serves your content using modern protocols such as HTTP/2 or HTTP/3, so a CDN in front of an older server fixes the files it serves.
  • Check the other domains. If the flagged files come from an old image server, a font host or a plugin's external service, move those files to your own domain or CDN, or replace the service.

nginx

server {
    listen 443 ssl;
    http2 on;
    # ssl_certificate, ssl_certificate_key and the rest stay as they are
}

The http2 directive exists from nginx 1.25.1. On older versions it is a parameter of the listen line instead: listen 443 ssl http2;. HTTP/3 in nginx comes from a separate module that its documentation still calls experimental, so for HTTP/3 a CDN is the simpler route.

Apache

LoadModule http2_module modules/mod_http2.so
Protocols h2 http/1.1

Put Protocols in the server config or the HTTPS virtual host. Apache's guide warns that with the prefork MPM, HTTP/2 handles only one request at a time per connection, and recommends the event MPM.

Shopify and hand-built sites

Shopify serves storefronts through its CDN over HTTP/3, so your own theme files are fine. If the card appears, the flagged files come from another domain, such as an app's or an outside service's, and the fix is with that provider or in replacing the app.

Hand-built sites: enable HTTP/2 on the server as shown above, and drop HTTP/1.1-era tricks such as spreading files over extra domains (domain sharding). With HTTP/2, parallel requests share one connection, so extra domains only add connections.

Mistakes to avoid

  • Looking for the warning in PageSpeed Insights. It isn't shown there; run Lighthouse from Chrome DevTools instead.
  • Enabling HTTP/2 without HTTPS. Browsers use HTTP/2 only over HTTPS connections.
  • Turning on HTTP/2 under Apache prefork and expecting a speed-up. Requests still run one at a time per connection.
  • Blaming your server for other domains. Check the Domain column before you change hosts.

How to check that it worked

Reload with the Protocol column visible and confirm h2 or h3 for your own files, or run the curl command again. Then re-test with FlashMax or Lighthouse in DevTools 2 or 3 times, since lab results vary. Real-user data covers the last 28 days, so changes there take about four weeks.

Questions people ask

Why don't I see Use HTTP/2 or Modern HTTP in PageSpeed Insights?

Chrome's documentation says the Modern HTTP insight isn't available in PageSpeed Insights. Run Lighthouse from Chrome DevTools, or check the Protocol column in the Network panel.

Do I need HTTP/3, or is HTTP/2 enough?

HTTP/2 clears the warning, which flags only HTTP/1.1 and older. HTTP/3 also keeps one lost packet from holding up every file on the connection. web.dev notes that a CDN likely serves HTTP/2 or HTTP/3, so turn HTTP/3 on if your CDN or host makes it easy.

Why does the warning list files from other websites?

The insight checks every server that sends the page at least 6 static files. If an outside service still uses HTTP/1.1, only that service can change it; move the files to your own domain or CDN, or drop the service.

Is HTTP/2 the same as HTTPS?

No. HTTPS is the encrypted connection; HTTP/2 is a newer way of sending requests and responses over it. Browsers use HTTP/2 only over HTTPS, but a site on HTTPS can still be stuck on HTTP/1.1 if the server doesn't offer HTTP/2.

Can a WordPress plugin enable HTTP/2?

No. The protocol is set by the web server or CDN, not by WordPress. A plugin can't change it; your host, your server config or a CDN can.

Sources

  1. Modern HTTP (Chrome for Developers)
  2. Does not use HTTP/2 for all of its resources (Lighthouse docs, Chrome for Developers)
  3. Evolution of HTTP (MDN)
  4. Optimize Time to First Byte (web.dev)
  5. Network features reference (Chrome DevTools)
  6. Module ngx_http_v2_module (nginx.org)
  7. Module ngx_http_v3_module (nginx.org)
  8. HTTP/2 guide (httpd.apache.org)
  9. The Shopify platform (Shopify.dev)

Rather have it done?

The FlashMax team fixes the issues in your report, on a copy first, and shows the before-and-after.

See the speed optimization service

              AMERICANEXPRESSPayPalDISCOVERstripeVISA