Is there a way to check whether a web server supports HTTP 1.0 or 1.1? If so, how is this done?
8 Answers
You could issue a:
curl --head www.test.com that will print out the HTTP version in the first line of the output...
e.g.
HTTP/1.1 200 OK Content-Length: 28925 Content-Type: text/html Last-Modified: Fri, 26 Jun 2009 16:08:04 GMT Accept-Ranges: bytes ETag: "a41944978f6c91:0" Server: Microsoft-IIS/7.0 X-Powered-By: ASP.NET Date: Fri, 31 Jul 2009 06:13:25 GMT 4 Comments
-v parameter that you get a list of the supported protocols ie.: * ALPN, offering h2 * ALPN, offering http/1.1In Google Chrome you can see protocol of each requests like this
open developers tools with F12
go to Network Tab
right click any where in column headers (like Name in the picture) and from the context menu select Protocol to be displayed as a new column
then you will see values like h2 (HTTP 2) or http/1.1 entry like the following picture in Protocol column
1 Comment
In Google Chrome and Brave, you can easily use the Developer tools (F12 or Command + Option + I). Open the Network tab, find the request, click the Header tab, scroll down to "Response Headers", and click view source. It should show the HTTP version in the first line.
In the screenshot below, the server is using HTTP/1.1, as you can see: HTTP/1.1 200 OK. If that is missing, it's HTTP/2, since there is no readable source, it's in binary instead.
2 Comments
news.ycombinator.com, the "view source" button was present. If it's missing, it's HTTP/2, reason explained on stackoverflow.com/a/40867107This should work on any platform that includes a telnet client:
telnet <host> 80 Then you have to type one of the following blind:
HEAD / HTTP/1.0 or
GET / and hit enter twice.
The first line returned should output the HTTP version supported:
telnet www.stackoverflow.com 80 HEAD / HTTP/1.0 HTTP/1.1 404 Not Found Content-Length: 315 Content-Type: text/html; charset=us-ascii Server: Microsoft-HTTPAPI/2.0 Date: Fri, 31 Jul 2009 15:15:15 GMT Connection: close Comments
There are two additional methods that can be used to determine the version of HTTP supported by a web server:
Alt-Svc header
Upon a request to the server, the server may return a Alt-Svc header which can specify which versions of HTTP are supported. This information can be used by the browser to determine an upgrade from HTTP/2 to HTTP/3 is possible. For example, when I visit www.google.com, the first request is a HTTP/2 request and contains the following Alt-Svc header:
alt-svc: h3=':443'; ma=2592000,h3-29=':443'; ma=2592000 Here, the h3 means HTTP/3. After this response is received, my browser starts to issue HTTP/3 requests instead of HTTP/2.
ALPN parameter of the SVCB and HTTPS DNS resource records (RR)
Since November 2023 there is a new mechanism for specifying which version of HTTP is supported by a server: the application-level protocol negotiation (ALPN) parameter of the SVCB and HTTPS DNS RR.
Using a tool like dig, you can query this header directly to view it's definition:
dig www.google.com HTTPS which responds with:
www.google.com. 10061 IN HTTPS 1 . alpn="h2,h3" Here you can see the ALPN value is h2 for HTTP/2 and h3 for HTTP/3.
1 Comment
openssl s_client command?$curl --head https://url:port -k
You get result something like...
HTTP/1.1 200 OK blah....blah. blah...blah..
$ So first line shows version it supports..


