How to check if HSTS is enabled?

Technology CommunityCategory: Web SecurityHow to check if HSTS is enabled?
VietMX Staff asked 3 years ago

Run:

curl -s -D- https://example.com/ | grep -i Strict-Transport-Security

Hence, if HSTS is enabled, there will be an STS header with the “max-age” directive value. In an opposite case, there would be no message from the server, since there is nothing to send in response to the above stated command.