How Browsers Handle HSTS Errors: A Practical Comparison

HTTP Strict Transport Security sounds simple on paper: tell the browser to use HTTPS for your domain, and the browser enforces it. The messy part starts when HTTPS is broken. That is where HSTS errors become very different from normal TLS warnings. If a site has an active HSTS policy and the certificate is invalid, browsers usually refuse to let the user click through. No “I accept the risk” shortcut. No “proceed anyway” button. From the browser’s point of view, allowing a bypass would defeat the whole point. ...

November 5, 2026 · 8 min · headertest.com

HSTS Mistakes on Shopify Stores and How to Fix Them

HSTS looks simple: send one header, force HTTPS, move on. In e-commerce, especially on Shopify, that simplicity is deceptive. I’ve seen teams assume HSTS is “handled by the platform,” then get burned by custom domains, broken subdomains, mixed redirect chains, or a preload decision they couldn’t easily undo. Shopify removes a lot of infrastructure pain, but it doesn’t remove responsibility. You still own the domain, the DNS, any subdomains, third-party assets, and the customer experience when HTTPS behavior goes sideways. ...

October 30, 2026 · 7 min · headertest.com

HSTS for Ruby on Rails: Pros, Cons, and Safe Rollout

HSTS in Rails is one of those security wins that looks trivial right up until you break a domain for months. If you run a Rails app over HTTPS, you should probably send Strict-Transport-Security. But the real question for a developer team isn’t “should we use HSTS?” It’s “which HSTS policy should we ship, and how safely can we get there?” Rails makes this pretty easy, but the tradeoffs matter. A weak HSTS policy leaves downgrade risk on the table. An aggressive one can lock users and subdomains into HTTPS before your infrastructure is ready. ...

October 11, 2026 · 7 min · headertest.com

HSTS on DigitalOcean App Platform: A Real-World Fix

I’ve seen this pattern a lot on managed platforms: the app is already on HTTPS, the TLS certificate is valid, redirects are enabled, and everyone assumes transport security is done. It usually isn’t. For one client project running on DigitalOcean App Platform, the site looked fine at a glance. https:// loaded cleanly, the platform handled certificates, and HTTP redirected to HTTPS. But the app still had a gap that matters in the real world: no HSTS header. ...

September 29, 2026 · 7 min · headertest.com

When HSTS Is Set Too Aggressively

HTTP Strict Transport Security looks simple: send a header, force HTTPS, move on. Until somebody sets it too aggressively. Then you get broken subdomains, painful rollback, local dev weirdness, certificate fires, and a support thread full of “the site is down for me” even though your origin is technically healthy. I like HSTS. You should probably use it. But I’ve also seen teams turn a good control into a self-inflicted outage because they treated it like a checkbox instead of a deployment with blast radius. ...

September 26, 2026 · 6 min · headertest.com

HSTS for Cloudflare Pages Functions

HTTP Strict Transport Security sounds boring right up until you need it. HSTS is the header that tells browsers: “stop trying plain HTTP for this site, always use HTTPS.” That shuts down protocol downgrade attacks and removes a whole class of accidental insecure requests. If your site is on Cloudflare Pages, adding HSTS is easy. Adding it safely is the part people mess up. I’ve seen teams copy-paste max-age=31536000; includeSubDomains; preload into production without checking whether every subdomain actually supports HTTPS. That’s how you brick old marketing hosts and weird internal tools. ...

September 3, 2026 · 6 min · headertest.com

HSTS for Python with Flask: Setup, Pitfalls, and Testing

HSTS is one of those headers that looks trivial until you ship it wrong. For Flask apps, the basic idea is simple: tell browsers to always use HTTPS for your domain. That blocks protocol downgrade attacks and kills off a whole class of “accidentally served over HTTP” mistakes. But HSTS also has sharp edges. If you enable it too early, on the wrong host, or behind a misconfigured proxy, you can lock users into a broken site. ...

August 23, 2026 · 6 min · headertest.com

HSTS and Service Workers: Practical Reference Guide

HSTS and service workers overlap in ways that bite teams during deployment, local testing, and incident response. The short version: HSTS tells the browser to always use HTTPS for a host. Service workers only work in secure contexts, with a few localhost exceptions. If you get your HTTPS and redirect behavior wrong, service worker registration gets flaky fast. If you get HSTS wrong, rollback gets painful because browsers cache the policy. I’ve seen teams debug “random” service worker failures that were really bad TLS, mixed hostnames, or a stale HSTS policy. This guide is the practical version. ...

August 19, 2026 · 6 min · headertest.com

HSTS for Kong API Gateway: Pros, Cons, and Setup

HTTP Strict Transport Security sounds simple: send one response header, force browsers onto HTTPS, done. In practice, the hard part is deciding where to manage it in Kong and how aggressively to roll it out without breaking edge cases. If you run Kong API Gateway, you usually have a few choices: Set HSTS in Kong itself Set HSTS in an upstream app behind Kong Set HSTS at an outer load balancer or CDN instead of Kong Use a phased rollout with short max-age first, then increase later I’m opinionated on this one: if Kong is your main HTTPS entry point, HSTS usually belongs there. It keeps policy consistent across services and avoids every team reinventing the same header logic. But there are trade-offs, and some teams absolutely should not flip on preload-style settings on day one. ...

August 17, 2026 · 6 min · headertest.com

HSTS for Rust with Actix-web: Copy-Paste Reference

HTTP Strict Transport Security is one of those headers that’s simple, powerful, and easy to get subtly wrong. If you’re serving a Rust app with Actix-web, HSTS usually comes down to one header: Strict-Transport-Security: max-age=31536000; includeSubDomains That header tells browsers: “For this domain, always use HTTPS for the next year.” Once a browser sees it over a valid HTTPS connection, it will refuse to use plain HTTP for that site until the policy expires. ...

July 24, 2026 · 7 min · headertest.com