You Cannot Visit This Site Right Now Because the Website Uses HSTS
The site uses HSTS, so the browser will not let you continue past a certificate error. What it means and what to do as a visitor or site owner.
On this page
HSTS: what the message means
HSTS (HTTP Strict Transport Security) is an instruction a site sends to the browser: "from now on, only connect to me securely and never accept a faulty certificate". It is like a building telling the doorman "nobody comes in through the side door; if the main door's lock breaks, nobody comes in at all". The HSTS standard explicitly forbids the browser from letting the user bypass the warning.
The browser learns that a site uses HSTS in two ways:
- From an earlier visit. The site sent the
Strict-Transport-Securityheader and the browser remembers it for as long asmax-agesays (often a year or more). - From a built-in list (preload). Chrome and most other browsers ship with a list of domains that are always HSTS, even on the very first visit. The list also contains entire endings such as .app, .dev and .page: every site under those endings must use HTTPS.
The HSTS message always appears together with a certificate error code. That code tells you what actually broke:
NET::: the certificate has expired or your clock is wrong. See ERR_ERR_ CERT_ DATE_ INVALID CERT_ .DATE_ INVALID NET::: the certificate is for a different name. See ERR_ERR_ CERT_ COMMON_ NAME_ INVALID CERT_ .COMMON_ NAME_ INVALID NET::: the browser does not trust the issuer. See ERR_ERR_ CERT_ AUTHORITY_ INVALID CERT_ .AUTHORITY_ INVALID
How it looks in Chrome, Edge, Firefox and Safari
| Browser | What the page says | Code |
|---|---|---|
| Chrome | "Your connection is not private" and, in the details, "You cannot visit … right now because the website uses HSTS.", with no option to continue | The certificate's code, e.g. NET::, NET::, NET:: |
| Edge | "Your connection isn't private", with no option to continue | Same codes as Chrome |
| Firefox | "Did Not Connect: Potential Security Issue", explaining that the site has an HSTS policy and "You can't add an exception to visit this site." | The certificate's code, e.g. SEC_, SSL_, SEC_ |
| Safari | "This Connection Is Not Private" | — |
If you are a visitor
- Don't look for a way around it. The block exists to protect you. If someone is intercepting the connection, bypassing it would hand them your passwords.
- Check the date, time and time zone. With a wrong clock every certificate looks invalid. Turn on automatic time.
- Switch networks. Wi-Fi in hotels, airports and cafés often "catches" connections until you sign in on its login page. Finish the Wi-Fi sign-in first and try again, or use mobile data.
- Check antivirus, VPN or a company network. Software that inspects HTTPS traffic with its own certificate often causes this error. Temporarily turn off "HTTPS scanning" or the VPN.
- Try another device. If the site does not open from anywhere, the problem is the site. Tell its owner.
- Clearing the browser's HSTS "memory": only in a special case. It helps only when you know the site deliberately stopped using HTTPS (e.g. your own test site), not when its certificate is simply broken. In Chrome: type
chrome://net-internals/#hstsand enter the domain under "Delete domain security policies". This does not work for domains on the built-in list, and if the site still sends the HSTS header it comes back on the next visit. In Firefox: open History, right-click a page of the site and choose "Forget About This Site…". That also deletes the site's history and cookies, so you will be signed out.
If you own the website: the usual causes
- A problem with the certificate itself. Expired, for the wrong name or with an incomplete chain. HSTS just makes the error impossible to click through. Fix the certificate using the guide for the code you see, and the message goes away on its own.
- A subdomain without a valid certificate while you use
includeSubDomains. With this option HSTS applies to EVERY subdomain. An old subdomain that only worked over http (e.g. an old panel or test site) suddenly becomes unreachable. Put a valid certificate on every subdomain you use. - The domain is on the preload list. Getting off it is not easy: according to hstspreload.org, removal takes months to reach users through Chrome updates. To be accepted on the list a domain needs a
max-ageof at least one year,includeSubDomainsandpreload, so every subdomain must have HTTPS. - You want to switch HSTS off. If you simply remove the header, browsers that have seen it remember it until its
max-ageruns out. The right way is to keep serving valid HTTPS withStrict-Transport-Security: max-age=0long enough for your visitors to see it. If the domain is also preloaded, request its removal too. - HSTS is added somewhere else. If a CDN or proxy (e.g. Cloudflare) sits in front of the site, the header may be added there rather than by your server. Check its settings as well.
Check which HSTS policy your site sends
The Security Headers Checker shows whether the site sends HSTS, with which max-age, and whether it has includeSubDomains and preload (max-age=0 means disabled). The SSL Checker shows whether the certificate has expired, which names it covers and whether the chain is complete.
More: security headers and HSTS, ERR_
Common mistakes
- Turning on
includeSubDomainsorpreloadwithout checking that ALL subdomains have a valid certificate. - Starting straight away with a one-year
max-age. hstspreload.org recommends ramping up: 5 minutes, then one week, then one month. - Removing the header and believing HSTS is switched off immediately.
- Hunting for bypass tricks instead of fixing the certificate.