How to check server's HTTP version

This article explains practical methods to check a server's HTTP version, showing how to use curl and Chrome DevTools for quick checks.

Since not everyone uses HTTP/2 yet, I've been looking for the easiest way to check the HTTP version of a server. Here's what I found:

Data taken from W3Techs

Curl

You can check the HTTP version through a simple curl command. It's useful, but not as much as other solutions. Great if you want to quickly check only one server:

curl --head https://example.com
 
### And you'll get something like this:
 
> curl --head https://example.com
HTTP/2 200
accept-ranges: bytes
age: 262372
cache-control: max-age=604800
content-type: text/html; charset=UTF-8
date: Thu, 01 Aug 2024 21:11:14 GMT
etag: "3147526947"
expires: Thu, 08 Aug 2024 21:11:14 GMT
last-modified: Thu, 17 Oct 2019 07:18:26 GMT
server: ECAcc (dcd/7D63)
x-cache: HIT
content-length: 1256

Chrome DevTools

Using Chrome DevTools to preview the HTTP version seems to be the best way to do it. You can see the version per request in the Network tab, and it takes 2 clicks to enable.

  • Go to DevTools and the Network Tab (cmd + opt + i)
  • Click on a column header and select "Protocol".
  • This will add another column with the HTTP version

HTTP/1.1 will be displayed as http/1.1
HTTP/2 will be displayed as h2
HTTP/3 will be displayed as h3

Network tab


Published on August 1, 2024 2 min read