Navigation Failed Because The Request Was For An Http Url With Https-only Enabled May 2026
fetch('http://mybackend.com/api/data'); <img src="http://cdn.example.com/logo.png">
HTTPS-Only mode forces the browser to automatically upgrade every request to HTTPS. If the upgrade fails (or if you explicitly hardcode http:// ), the browser throws an error instead of falling back to unsafe HTTP. You cannot fix this by telling your users to turn off HTTPS-Only mode. Instead, you need to fix your code or infrastructure. Fix 1: Use Protocol-Relative or Absolute HTTPS URLs (The Easiest) Never hardcode http:// or https:// in your frontend code. Use protocol-relative URLs (starting with // ) or absolute paths.
This is not a server error (404, 500). It is a client-side refusal . The request never actually left your browser. fetch('http://mybackend
April 14, 2026 | Reading Time: 4 minutes
Audit your code for stray http:// references today—your users’ browsers are already doing the same. Instead, you need to fix your code or infrastructure
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload Once the browser sees this header, it will automatically convert all future http:// requests to https:// before they are sent, eliminating the error. Sometimes you cannot control the external API—maybe a legacy vendor only serves HTTP. In this case, do not call the HTTP endpoint directly from the browser. Call your own HTTPS backend, and let your server proxy the request to the HTTP vendor.
Add this header to your server (Apache/NGINX): This is not a server error (404, 500)
The golden rule of 2026 is simple: APIs, images, iframes, and fonts.