Introduction
Websites need to keep visitors safe by making sure browsers only use secure connections. The HSTS header tells browsers to always use HTTPS, preventing unsafe connections.
When you want to make sure visitors never connect to your site using HTTP by mistake.
When you want to protect users from attackers trying to intercept their data by forcing secure connections.
When you have recently switched your website to HTTPS and want browsers to remember this.
When you want to improve your website's security score and trustworthiness.
When you want to avoid mixed content warnings caused by loading some parts over HTTP.