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.