Check if a website supports HTTP/2

HTTP/2 ProtocolThe web is ready to get a whole new protocol! Since about 1997, the web has been mostly powered by HTTP/1.1. Back in the 90’s, the web had other needs than we have today. The new protocl version, HTTP version 2 or in short HTTP/2, has some much needed improvements in terms of speed, reliability and security.

I would strongly recommend you to upgrade your webserver to also support the HTTP/2 protocol.

Advantages of HTTP/2 over HTTP/1.1

HTTP/2 improves a whole lot over version 1.1. Some key advantages of HTTP/2 include:

  • Multiplexing: multiple HTTP requests can be bundled from the browser and be sent to the web server. This results in a reduced number of total active connections. This also means that the overall speed of the page will be greatly reduced as well.
  • Encryption: the use of encryption using the TLS protocol is much more efficient with HTTP/2.
  • HTTP header compression: compressing headers reduces the overhead of additional requests.
  • Server push: instead of waiting on the browser to sent a request to the server (reactive behaviour), the server will pro-actively sent components to the browser.

Overall, HTTP/2 means the server load will go down and the loading times for the end-user will go down drastically as well. And, since it results in a better user experience, it may be advantageous for SEO as well.

Test HTTP/2 support

Now you know what the advantages are of HTTP/2, you might want to see if your website or hosting provider already supports this new protocol.

Test HTTP/2 via command line

Using the command line, you can easily check if a website is using the newest HTTP/2 protocol. Using cURL, execute the following command:

curl --http2 example.org

Online HTTP/2 test tools

There are quite some tools available on the internet that let you enter the website and will show you if this site is using HTTP/2.

  1. KeyCDN: a free HTTP/2 online test tool to Verify HTTP/2.0 Support
  2. Akamai: test if your browser support HTTP/2. They also have a demo to compare the pageload time of a HTTP/1.1 versus the HTTP/2 version.
  3. CloudFlare: for a long time, CloudFlare is one of my favourite companies in terms of innovation and technology. They have a special subdomain to access their site in full HTTP/2 mode.

HTTP/2 browser extension

If you regularly want to get information about HTTP/2 of website you visit, it might be worth installing a browser plug-in. The HTTP/2 and SPDY indicator plug-in for Google Chrome is an excellent tool to visually indicate if the website you are currently using supports HTTP/2 or SPDY.

 

Author Bio

Thank you for your interest in my blog! On this miniblog, I write mostly short (technical) blog posts that might interest other people. Read more about me or feel free to contact me.

 

9 thoughts on “Check if a website supports HTTP/2

  1. Pingback: Update DirectAdmin to PHP 7.0 (CustomBuild) | Thomas' Miniblog
  2. Pingback: Add falling snow to your website | Thomas' Miniblog
  3. May I assume that
    jeffs@jeff-desktop:~$ curl –http2 http://google.com
    curl: (1) Unsupported protocol
    jeffs@jeff-desktop:~$

    Means that google does *not* support HTTP/2, or does that mean that I am not testing properly?

    jeffs@jeff-desktop:~$ curl –version
    curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3
    Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
    Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
    jeffs@jeff-desktop:~$

    I am running ubuntu 16.04.

    I suspect that I am *not* testing it properly, because when I run tcpdump on tcp port 80, I see nothing when I use the –http2 switch (no packets at all), but everything looks normal when I do not use the the –http2 switch. That suggests to me that there is a problem with the curl client.

    1. Jeff,

      You need to compile curl with –with-nghttp2. Then “curl –version” will report nghttp2 in Protocols listing. For example:

      curl 7.51.0-DEV (x86_64-unknown-linux-gnu) libcurl/7.51.0-DEV OpenSSL/1.0.2j zlib/1.2.8 libssh2/1.7.0 nghttp2/1.14.1 librtmp/2.3
      Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
      Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets

      Then –http2 should work fine.

Leave a Reply

Your email address will not be published. Required fields are marked *