What is the HTTP/2.0 protocol?

HTTP/2 (aka HTTP/2.0) is the successor to the HTTP/1.1 protocol and represents a breakthrough in web communication efficiency. Unlike its predecessor, HTTP/2 introduces several groundbreaking features designed to improve security, speed and overall performance. HTTP/2 optimizes data transfer between servers and clients by introducing multiplexing, allowing multiple requests and responses to be exchanged simultaneously over a single TCP connection. This significantly reduces latency and speeds up page loading times, which in turn improves also the search engine ranking and provides a more responsive user experience.

How to enable HTTP/2 protocol on Nginx

Befor begine, remember that HTTP/2 protocol is supported on Nginx v1.9.5 and onwards.

Edit your Nginx vHost configuration file and add these lines:

Then restart Nginx for the changes to take effect:

Example HTTP response header of HTTP/2

You can see the HTTP/2 is present in the response status message: