HTTP/2 improves resource access efficiency over earlier versions of the HTTP protocol. Learn about the benefits of HTTP/2 and how to enable it for your domain.
Background
HTTP/2, also known as HTTP 2.0, introduces multiplexing, header compression, stream dependencies, and server push. These features address long-standing issues in HTTP 1.1 and improve request performance while maintaining semantic compatibility. Modern browsers, including Chrome, Internet Explorer 11 (IE11), Safari, and Firefox, support HTTP/2.
HTTP/2 offers the following benefits:
-
Binary protocol: Unlike text-based HTTP 1.x, HTTP/2 encodes all transmitted information into binary-framed messages. This binary foundation makes the protocol more extensible and enables new capabilities such as frame-based data and instruction transmission.
-
Content security: HTTP/2 is built on HTTPS and inherits its security features while mitigating the performance overhead that HTTPS can introduce.
-
Multiplexing: A single TCP connection can carry multiple concurrent requests, with responses arriving in any order. Stream dependencies let the client indicate resource priority so the server can deliver critical assets first.
-
Header compression: HTTP headers often carry repetitive data across requests. HTTP/2 uses HPACK compression, where both client and server maintain a shared header table and transmit only compact indexes instead of full headers. This significantly reduces overhead and improves efficiency.
Prerequisites
Before you enable HTTP/2, ensure that you have configured an HTTPS certificate. For more information, see Configure an HTTPS Certificate.
-
If you are configuring an HTTPS certificate for the first time, you must wait until the certificate is active before you can enable HTTP/2.
-
If you disable the HTTPS certificate after enabling HTTP/2, the system automatically disables HTTP/2.
Procedure
-
Log in to the ApsaraVideo VOD console.
-
In the left-side navigation pane, under Configuration Management, click CDN Configuration > Domain Names.
-
Find the domain name that you want to configure and click Configure in the Actions column.
-
Click the HTTPS tab and turn on the HTTP/2 switch.
You must configure an HTTPS certificate before you can enable HTTP/2. Otherwise, the switch is disabled.