Once a browser or client is presented with the HSTS policy, it caches the information for the specified max-age period. During that period, the browser will refuse to access the web service over unencrypted HTTP, and will refuse to grant exceptions to certificate errors.
If the includeSubDomains parameter was specified for an HSTS policy, these restrictions will also apply to all subdomains of the current domain.
It’s practically impossible to back out an HSTS policy. When you test HSTS, use a very short max-age timeout and ensure you’re comfortable with the effects and the obligation to maintain an HTTPS version of your site. When you first go live with your HSTS policy, keep max-age small and increase it only when you’re confident about doing so.
The cache time comes from the origin/site HSTS header, which is set with something like
Strict-Transport-Security: max-age=16070400; includeSubDomains; always;
This setting will continue to pass the HSTS header, unless it is disabled.
To disable HSTS for clients and wipe out their redirects use
Strict-Transport-Security: max-age=0;
Specifying a zero time duration signals the UA to delete the HSTS Policy (including any asserted includeSubDomains directive) for that HSTS Host.
Error code: “ssl_error_bad_cert_domain”.
If you see “I understand the risks”, follow those instructions. Otherwise:
Error message “Cannot connect to the real <domain name>.”
Error message “Cannot connect to the real <domain name>.”