Learn about how Cloudflare supports HTTP/2 and HTTP/3 to speed up your website without requiring changes to your existing codebase.
HTTP/2 and HTTP/3 accelerate page load and are free for all Cloudflare plans. HTTP/2 is enabled by default and requires an SSL certificate at Cloudflare’s edge network. Configure HTTP/2 and HTTP/3 via the Cloudflare Network app. Domains on Free plans cannot disable HTTP/2.
A browser and web server automatically negotiate the highest protocol available. Thus, HTTP/3 takes precedence over HTTP/2.
To determine the protocol used for your connection, enter example.com/cdn-cgi/trace from a web browser or client and replace example.com with your domain name. Several lines of data are returned. If http=h2 appears in the results, the connection occurred over HTTP/2. Other possible values are http=http2+quic/99 for HTTP/3, and http=http/1.x for HTTP/1.x.
HTTP/2 improves page load times via:
- Connection multiplexing - Retrieves multiple resources in a single network request. Responses are sent when resources are available to avoid slowing page rendering.
- HTTP header compression - Compresses headers and simplifies HTTP requests to avoid resending headers.
- HTTP/2 Server Push - To improve page load speed, Cloudflare provides additional resources for a client to cache without waiting for additional requests.
- Not all browsers support HTTP/2 and use HTTP 1.x instead.
- Connection multiplexing is on a per-domain basis.
HTTP/3 enables fast, reliable, and secure connections. HTTP/3 encrypts Internet transport by default using a protocol from Google called QUIC. Enable HTTP/3 via the Cloudflare Network app.
For more information, review our HTTP/3 developer documentation.
Server Push extracts URI references within the rel=preload parameter of the Link header from your origin server. These additional URIs are then provided to the client. Example Link headers include:
Link: </images/image.png>; rel=preload;
Link: </css/main.css>; rel=preload;
Server Push is limited to 50 assets per page and 100 per connection.
Browser support information: