Skip to content
RU

HSTS Error: Why You Cannot Bypass It and How to Fix It

Laptop on a wooden table showing a red browser security warning page, cup of tea beside

What it means: The site uses HSTS, so the browser blocks a certificate error and removes the option to proceed.

  1. Check your device date and time
  2. Try another network; avoid captive portals
  3. Pause antivirus HTTPS scanning
  4. If it fails everywhere: fix the server certificate
  5. Owners: check openssl s_client output

Test your URL now

Runs a full TLS check: handshake, protocol versions, certificate chain, trust and expiry.

Check your site's SSL →

What an HSTS error means

"HSTS error" is not a separate error code. HTTP Strict Transport Security (RFC 6797) lets a site tell browsers, through the Strict-Transport-Security response header or the built-in preload list, to use only HTTPS for a set period. While that policy is active, the browser rewrites http:// links to https:// before sending them (Chrome DevTools shows a "307 Internal Redirect"), and RFC 6797 requires that any certificate or TLS error ends the connection with no user recourse.

So the real problem is a certificate or handshake error such as NET::ERR_CERT_DATE_INVALID, NET::ERR_CERT_AUTHORITY_INVALID or NET::ERR_CERT_COMMON_NAME_INVALID. HSTS only changes the outcome: Chrome removes the "Proceed" link and explains "You cannot visit example.com right now because the website uses HSTS." HSTS itself is working as designed; the certificate is what needs fixing.

Causes in Chrome, Edge, Firefox and Safari

BrowserWhat you seeMost common trigger
ChromeA NET::ERR_CERT_* page with "…because the website uses HSTS" and no Proceed linkExpired, untrusted or wrong-name certificate
EdgeThe same Chromium pageSame as Chrome
Firefox"…uses HTTP Strict Transport Security (HSTS) to specify that Firefox may only connect to it securely. As a result, it is not possible to add an exception for this certificate."Same certificate problems, reported with Firefox codes such as SEC_ERROR_UNKNOWN_ISSUER
SafariIts own warning, without a way to continueSame certificate problems

On the server side: an expired certificate, a missing intermediate, or a hostname that the certificate does not cover. includeSubDomains is a frequent trap: once the parent domain sends it, every subdomain must have a valid certificate too, including internal and staging hosts with self-signed ones. Preloaded domains and whole preloaded TLDs such as .dev and .app are HTTPS-only in browsers before the first visit.

On the visitor side: a wrong system date, a hotel or airport captive portal that intercepts HTTPS, antivirus HTTPS scanning, or a corporate proxy whose root certificate is not installed. On ordinary sites these show a warning you could click through; on HSTS sites they are a hard stop.

Behind Cloudflare, nginx or another proxy

HSTS can be set in two places: by your origin, or by Cloudflare under SSL/TLS > Edge Certificates > HTTP Strict Transport Security (HSTS). With Cloudflare proxying, visitors see Cloudflare's edge certificate, so the edge must cover every hostname you serve. The risk comes later: if you pause Cloudflare or switch a record to DNS-only, browsers that cached your HSTS policy now validate the origin's certificate directly, and a self-signed or Origin CA certificate there fails with no way past it.

On nginx, send the header only on HTTPS responses and include always so error pages carry it too:

server {
    listen 443 ssl;
    server_name example.com;
    ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

    # Ramp max-age up gradually; add includeSubDomains only when every
    # subdomain has a valid certificate
    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
}

Use fullchain.pem, not cert.pem, so the intermediate is sent. Browsers ignore an HSTS header received over plain HTTP.

If you own the site

  1. Find the real error. openssl s_client -connect example.com:443 -servername example.com -showcerts </dev/null and read Verify return code.
  2. Check dates and names. openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -dates -ext subjectAltName.
  3. Renew or reissue. With Let's Encrypt, certbot renew then reload the web server; make sure the new certificate covers every hostname, including www.
  4. Repair subdomains under includeSubDomains. Give each subdomain a valid certificate, or stop sending includeSubDomains and wait for cached policies to expire.
  5. To retire HSTS, send Strict-Transport-Security: max-age=0 over valid HTTPS; each browser forgets the policy on its next visit. A preloaded domain needs the removal form at hstspreload.org, and the change takes months to reach users.

If you are a visitor

Check that your device's date, time and time zone are correct. Then try another network: if you are on hotel or airport Wi-Fi, complete the portal login on a plain HTTP site first. Pause the HTTPS or web-scanning feature of your antivirus and disconnect from the VPN or corporate proxy, then retry.

Clearing the browser cache does not help: the certificate is checked live and HSTS is stored separately. For a domain you control, such as a development host, Chrome lets you delete a dynamic policy at chrome://net-internals/#hsts under "Delete domain security policies"; preloaded entries cannot be deleted. In Firefox, "Forget About This Site" in the history usually clears it. Do not do this for sites you do not own: the block may be protecting you from interception. If the error appears for everyone, only the site owner can fix the certificate.

How to confirm the fix

curl -sI https://example.com/ | grep -i strict-transport-security
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | grep 'Verify return code'
# expect: Verify return code: 0 (ok)

Test every hostname covered by includeSubDomains, not only the main site. The SSL/TLS checker shows expiry, chain and name coverage, and the security headers check shows the Strict-Transport-Security value you are sending.

Related errors

CertificateExpiry, issuer, domains (SAN)
ChainIntermediate and root CA validation
TLS ProtocolTLS version and cipher suite
VulnerabilitiesHeartbleed, POODLE, weak ciphers

Why teams trust us

TLS 1.3
supported
Full
CA chain check
3,158
checks in 30 days
30/14/7
days-to-expiry alerts

How it works

1

Enter domain

2

TLS chain verified

3

Expiry date & vulnerabilities

What Does the SSL Check Cover?

SSL/TLS is the encryption protocol that protects data between the browser and server. Our tool analyzes the certificate, chain of trust, TLS version, and knownvulnerabilities.

Certificate Details

Issuer, validity period, signature algorithm, covered domains (SAN), and validation type (DV/OV/EV).

Chain of Trust

Full chain verification: from leaf certificate through intermediates to root CA.

TLS Analysis

Protocol version (TLS 1.2/1.3), cipher suites, Perfect Forward Secrecy (PFS) support.

Expiry Alerts

Set up a monitor — get Telegram and email alerts 30/14/7 days before expiration.

DV vs OV vs EV Certificates

DV (Domain Validation)
  • Confirms domain ownership only
  • Issued in minutes automatically
  • Free via Let's Encrypt
  • Suitable for most websites
  • Most common certificate type
OV / EV
  • Organization (OV) or Extended Validation (EV)
  • Issued in 1-5 business days
  • Costs $50 to $500/year
  • For finance, e-commerce, government sites
  • Increases user trust

Who uses this

DevOps

SSL certificate monitoring

Security

TLS config audit

SEO

HTTPS as ranking factor

E-commerce

customer trust

Common Mistakes

Expired certificateBrowsers block sites with expired SSL. Set up auto-renewal or monitoring.
Incomplete certificate chainWithout intermediate CA, some browsers and bots cannot verify the certificate.
Mixed content on HTTPS siteHTTP resources on an HTTPS page — the browser lock icon disappears, reducing trust.
Using TLS 1.0/1.1Legacy TLS versions have known vulnerabilities. Use TLS 1.2+ or 1.3.
Domain mismatch in certificateThe certificate must cover all site domains, including www and subdomains.

Best Practices

Set up auto-renewalLet's Encrypt + certbot with cron — certificate renews automatically every 60-90 days.
Enable HSTSStrict-Transport-Security header forces browsers to always use HTTPS.
Use TLS 1.3TLS 1.3 is faster (1-RTT handshake) and safer — legacy ciphers removed.
Monitor expiration datesCreate a monitor on Enterno.io — get notified well before expiration.
Verify chain after renewalAfter certificate renewal, confirm that intermediate certificates are installed.

Get more with a free account

SSL certificate monitoring, check history and alerts 30 days before expiry.

Sign up free

Learn more

Sources

Frequently Asked Questions

Is it safe to bypass an HSTS error?

No, not on a site you do not control. The site asked browsers to refuse insecure connections, and the error may mean someone is intercepting the connection.

Does clearing cache or cookies fix an HSTS error?

No. The certificate is validated on every connection, and HSTS state is stored separately from cache and cookies. The fix is a valid certificate on the server or a working network path.

Why does only one subdomain show the HSTS error?

The parent domain probably sends includeSubDomains, so every subdomain must have a valid certificate. A staging or internal host with a self-signed certificate then fails with no bypass.

How do I remove my domain from the HSTS preload list?

Remove the preload directive and use the removal form at hstspreload.org. Removal reaches users only through browser updates, which takes months.

Why does the error appear only on public Wi-Fi?

Captive portals intercept HTTPS before you log in, presenting a certificate the browser cannot trust. Open a plain HTTP page to trigger the portal, then reload the site.

Try the live tool that powered this guide

Free plan — 10 monitors, checks every 5 min, no card required. Upgrade for 1-minute interval and multi-region monitoring.