How to check if a website has HTTP/2 protocol support

There are a lot of topics about the HTTP/2 protocol, but I wonder if there is a working website with this protocol.

I.e.

We can decide to use http:// or https://, but how can we write a HTTP/2 request?

I am aware that this protocol depends on the server capability, but I can not find a way to check if a website, e.g. google.com, has HTTP/2 support enabled.

HTTP/2 browser support

As I can see in this picture, all modern browsers support this protocol. I have not seen any link that could look like a new generation protocol.

Are we using the HTTP/2 protocol without knowing or it is just a fairy tale?


Solution 1:

You can just check it in: Chrome Dev Tool (F12) → NetworkProtocol.

It will tell you the protocol used and the domain of each transfer.

Chrome Dev Tool (F12) -> Network -> Protocol

Legend

http/1.1 = HTTP/1.1
h2          = HTTP/2


Note: If you cannot see the Protocol column, just right-click on any header and check the "Protocol" label.

Solution 2:

You can use the curl command to find out if a particular website has HTTP/2 protocol support or not. In the following example, just replace https://www.cloudflare.com/ with the URL you want to check for HTTP/2 support:

% curl -vso /dev/null --http2 https://www.cloudflare.com/

If you see offering h2 among the output messages, that means that the given URL supports HTTP/2. For example:

....
* ALPN, offering h2
* ALPN, offering http/1.1
....