coderef

Upgrade insecure requestsBaseline · Widely available

The Upgrade-Insecure-Requests HTTP request header tells the server that the response should redirect to a secure (HTTPS) resource.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Apr 30, 2018. Widely available since Oct 30, 2020.

Browser support

DesktopChrome
1–43Not supported
44+Supportedsince Jul 21, 2015
Current: 155
Edge
12–16Not supported
17+Supportedsince Apr 30, 2018
Current: 154
Firefox
1–47Not supported
48+Supportedsince Aug 2, 2016
Current: 157
Safari
1–10Not supported
10.1+Supportedsince Mar 27, 2017
Current: 27
MobileChrome Android
18–43Not supported
44+Supportedsince Jul 29, 2015
Current: 155
Firefox Android
4–47Not supported
48+Supportedsince Aug 2, 2016
Current: 157
Safari iOS
1–10Not supported
10.3+Supportedsince Mar 27, 2017
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: upgrade-insecure-requests.

Feature detection

There’s no simple runtime check for this feature; rely on the support table and test in your target browsers.

Sub-features

Support for each part of the feature (2). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
http.headers.Content-Security-Policy.upgrade-insecure-requests43174210.1434210.3
http.headers.Upgrade-Insecure-Requests44174810.1444810.3