You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/fundamentals/servers/kestrel/http3.md
+20-13Lines changed: 20 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,19 +2,18 @@
2
2
title: Use HTTP/3 with the ASP.NET Core Kestrel web server
3
3
ai-usage: ai-assisted
4
4
author: wtgodbe
5
-
description: Learn about using HTTP/3 with Kestrel, the cross-platform web server for ASP.NET Core.
5
+
description: "HTTP/3 support in Kestrel: Discover how to configure ASP.NET Core for HTTP/3, improve performance, and optimize your web server setup."
6
6
monikerRange: '>= aspnetcore-6.0'
7
-
ms.author: wigodbe
8
-
ms.custom: mvc, linux-related-content
9
-
ms.date: 11/13/2025
7
+
ms.author: wpickett
8
+
ms.date: 04/14/2026
10
9
uid: fundamentals/servers/kestrel/http3
11
10
---
12
11
13
12
# Use HTTP/3 with the ASP.NET Core Kestrel web server
14
13
15
14
[!INCLUDE[](~/includes/not-latest-version.md)]
16
15
17
-
:::moniker range=">= aspnetcore-8.0"
16
+
:::moniker range=">= aspnetcore-11.0"
18
17
19
18
[HTTP/3](https://datatracker.ietf.org/doc/rfc9114/) is an approved standard and the third major version of HTTP. This article discusses the requirements for HTTP/3. HTTP/3 is fully supported in .NET 7 or later.
20
19
@@ -46,28 +45,34 @@ The key differences from `HTTP/2` to `HTTP/3` are:
46
45
***Multiplexing**: While both support multiplexing, `HTTP/3`'s implementation with QUIC is more efficient and avoids the TCP-level head-of-line blocking issues.
47
46
***Connection Migration**: QUIC in `HTTP/3` allows connections to persist even when a client's IP address changes (like switching from Wi-Fi to cellular), improving mobile user experience.
48
47
48
+
## Early request processing
49
+
50
+
Kestrel can process HTTP/3 requests without first waiting for the control stream and the initial SETTINGS frame. This optimization reduces first-request latency on new HTTP/3 connections.
51
+
52
+
In ASP.NET Core versions earlier than .NET 11, Kestrel waited to receive the QUIC control stream and its initial SETTINGS frame before processing any request streams. This requirement is no longer necessary, which means the first request on a new connection completes faster.
53
+
49
54
## HTTP/3 requirements
50
55
51
-
HTTP/3 uses QUIC as its transport protocol. The ASP.NET Core implementation of HTTP/3 depends on [MsQuic](https://github.com/microsoft/msquic) to provide QUIC functionality. As a result, ASP.NET Core support of HTTP/3 depends on MsQuic platform requirements. For more information on how to install **MsQuic**, see [QUIC Platform dependencies](/dotnet/fundamentals/networking/quic/quic-overview#platform-dependencies). If the platform that Kestrel is running on doesn't have all the requirements for HTTP/3, then it's disabled, and Kestrel will fall back to other HTTP protocols.
56
+
HTTP/3 uses QUIC as its transport protocol. The ASP.NET Core implementation of HTTP/3 depends on [MsQuic](https://github.com/microsoft/msquic) to provide QUIC functionality. As a result, ASP.NET Core support of HTTP/3 depends on MsQuic platform requirements. For more information on how to install **MsQuic**, see [QUIC Platform dependencies](/dotnet/fundamentals/networking/quic/quic-overview#platform-dependencies). If the platform that Kestrel is running on doesn't have all the requirements for HTTP/3, Kestrel disables HTTP/3 and falls back to other HTTP protocols.
52
57
53
58
## Getting started
54
59
55
-
HTTP/3 is not enabled by default. Add configuration to `Program.cs` to enable HTTP/3.
60
+
HTTP/3 isn't enabled by default. Add configuration to `Program.cs` to enable HTTP/3.
* Enable HTTPS by using`UseHttps`. HTTP/3 requires HTTPS.
63
68
64
-
Because not all routers, firewalls, and proxies properly support HTTP/3, HTTP/3 should be configured together with HTTP/1.1 and HTTP/2. This can be done by specifying[`HttpProtocols.Http1AndHttp2AndHttp3`](xref:Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols.Http1AndHttp2AndHttp3) as an endpoint's supported protocols.
69
+
Because not all routers, firewalls, and proxies properly support HTTP/3, configure HTTP/3 together with HTTP/1.1 and HTTP/2. Specify[`HttpProtocols.Http1AndHttp2AndHttp3`](xref:Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols.Http1AndHttp2AndHttp3) as an endpoint's supported protocols.
65
70
66
71
For more information, see <xref:fundamentals/servers/kestrel/endpoints>.
67
72
68
73
## Configure QuicTransportOptions
69
74
70
-
QUIC transport options can be configured by calling the <xref:Microsoft.AspNetCore.Hosting.WebHostBuilderQuicExtensions.UseQuic%2A> extension method on <xref:Microsoft.AspNetCore.Hosting.IWebHostBuilder>.
75
+
Configure QUIC transport options by calling the <xref:Microsoft.AspNetCore.Hosting.WebHostBuilderQuicExtensions.UseQuic%2A> extension method on <xref:Microsoft.AspNetCore.Hosting.IWebHostBuilder>.
@@ -90,14 +95,16 @@ HTTP/3 is discovered as an upgrade from HTTP/1.1 or HTTP/2 via the [`alt-svc`](h
90
95
91
96
## Localhost testing
92
97
93
-
* Browsers don't allow self-signed certificates on HTTP/3, such as the Kestrel development certificate.
94
-
*`HttpClient`can be used for localhost/loopback testing in .NET 6 or later. Extra configuration is required when using `HttpClient` to make an HTTP/3 request:
98
+
* Browsers don't support self-signed certificates on HTTP/3, such as the Kestrel development certificate.
99
+
*Use `HttpClient` for localhost or loopback testing in .NET 6 or later. When you use `HttpClient` to make an HTTP/3 request, you need extra configuration:
95
100
96
101
* Set [`HttpRequestMessage.Version`](xref:System.Net.Http.HttpRequestMessage.Version) to 3.0, or
97
102
* Set [`HttpRequestMessage.VersionPolicy`](xref:System.Net.Http.HttpRequestMessage.VersionPolicy) to [`HttpVersionPolicy.RequestVersionOrHigher`](xref:System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher).
98
103
99
-
For more information on how to use HTTP/3 with `HttpClient`, see [HTTP/3 with .NET](/dotnet/core/extensions/httpclient-http3).
104
+
For more information about how to use HTTP/3 with `HttpClient`, see [HTTP/3 with .NET](/dotnet/core/extensions/httpclient-http3).
[HTTP/3](https://datatracker.ietf.org/doc/rfc9114/) is an approved standard and the third major version of HTTP. This article discusses the requirements for HTTP/3. HTTP/3 is fully supported in .NET 7 or later.
4
+
5
+
> [!IMPORTANT]
6
+
> Apps configured to take advantage of HTTP/3 should be designed to also support HTTP/1.1 and HTTP/2.
7
+
8
+
## HTTP/3 benefits
9
+
10
+
`HTTP/3`:
11
+
12
+
* Is the latest version of the Hypertext Transfer Protocol.
13
+
* Builds on the strengths of `HTTP/2` while addressing some of its limitations, particularly in terms of performance, latency, reliability, and security.
| Transport | Uses [TCP](https://developer.mozilla.org/docs/Glossary/TCP)| Uses [QUIC](https://www.rfc-editor.org/rfc/rfc9000.html)|
18
+
| Connection | Slower due to TCP + TLS | Combines transport and encryption handshakes |
19
+
| Setup | handshake | handshakes |
20
+
| Head-of-Line | Affected by TCP-level | Eliminated with QUIC |
21
+
| Blocking | blocking | stream multiplexing |
22
+
| Encryption | TLS over TCP | TLS is built into QUIC |
23
+
24
+
The key differences from `HTTP/2` to `HTTP/3` are:
25
+
26
+
***Transport Protocol**: `HTTP/3` uses QUIC instead of TCP. QUIC offers improved performance, lower latency, and better reliability, especially on mobile and lossy networks.
27
+
***Head-of-Line Blocking**: `HTTP/2` can suffer from head-of-line blocking at the TCP level, where a delay in one stream can affect others. `HTTP/3`, with QUIC, provides independent streams, so packet loss in one stream doesn't stall others.
28
+
***Connection Establishment**: `HTTP/3` with QUIC can establish connections faster, as it combines transport and encryption handshakes.
29
+
***Encryption**: `HTTP/3` mandates TLS 1.3 encryption, providing enhanced security by default, whereas it's optional in `HTTP/2`.
30
+
***Multiplexing**: While both support multiplexing, `HTTP/3`'s implementation with QUIC is more efficient and avoids the TCP-level head-of-line blocking issues.
31
+
***Connection Migration**: QUIC in `HTTP/3` allows connections to persist even when a client's IP address changes (like switching from Wi-Fi to cellular), improving mobile user experience.
32
+
33
+
## HTTP/3 requirements
34
+
35
+
HTTP/3 uses QUIC as its transport protocol. The ASP.NET Core implementation of HTTP/3 depends on [MsQuic](https://github.com/microsoft/msquic) to provide QUIC functionality. As a result, ASP.NET Core support of HTTP/3 depends on MsQuic platform requirements. For more information on how to install **MsQuic**, see [QUIC Platform dependencies](/dotnet/fundamentals/networking/quic/quic-overview#platform-dependencies). If the platform that Kestrel is running on doesn't have all the requirements for HTTP/3, then it's disabled, and Kestrel will fall back to other HTTP protocols.
36
+
37
+
## Getting started
38
+
39
+
HTTP/3 is not enabled by default. Add configuration to `Program.cs` to enable HTTP/3.
* Use HTTP/3 alongside HTTP/1.1 and HTTP/2 by specifying `HttpProtocols.Http1AndHttp2AndHttp3`.
46
+
* Enable HTTPS with `UseHttps`. HTTP/3 requires HTTPS.
47
+
48
+
Because not all routers, firewalls, and proxies properly support HTTP/3, HTTP/3 should be configured together with HTTP/1.1 and HTTP/2. This can be done by specifying [`HttpProtocols.Http1AndHttp2AndHttp3`](xref:Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols.Http1AndHttp2AndHttp3) as an endpoint's supported protocols.
49
+
50
+
For more information, see <xref:fundamentals/servers/kestrel/endpoints>.
51
+
52
+
## Configure QuicTransportOptions
53
+
54
+
QUIC transport options can be configured by calling the <xref:Microsoft.AspNetCore.Hosting.WebHostBuilderQuicExtensions.UseQuic%2A> extension method on <xref:Microsoft.AspNetCore.Hosting.IWebHostBuilder>.
For the full list of available QUIC transport options and their descriptions, see <xref:Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.QuicTransportOptions>.
59
+
60
+
## Alt-svc
61
+
62
+
HTTP/3 is discovered as an upgrade from HTTP/1.1 or HTTP/2 via the [`alt-svc`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Alt-Svc) header. That means the first request will normally use HTTP/1.1 or HTTP/2 before switching to HTTP/3. Kestrel automatically adds the `alt-svc` header if HTTP/3 is enabled.
63
+
64
+
## Localhost testing
65
+
66
+
* Browsers don't allow self-signed certificates on HTTP/3, such as the Kestrel development certificate.
67
+
*`HttpClient` can be used for localhost/loopback testing in .NET 6 or later. Extra configuration is required when using `HttpClient` to make an HTTP/3 request:
68
+
69
+
* Set [`HttpRequestMessage.Version`](xref:System.Net.Http.HttpRequestMessage.Version) to 3.0, or
70
+
* Set [`HttpRequestMessage.VersionPolicy`](xref:System.Net.Http.HttpRequestMessage.VersionPolicy) to [`HttpVersionPolicy.RequestVersionOrHigher`](xref:System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher).
71
+
72
+
For more information on how to use HTTP/3 with `HttpClient`, see [HTTP/3 with .NET](/dotnet/core/extensions/httpclient-http3).
0 commit comments