How to enable HSTS on third-party servers?

Let us perform a general overview of the HSTS Policy implementation for the most widespread server types. The following guidelines will be useful for web administrators who have the root access to the servers’ configuration files.

  • On Nginx, the HSTS Header field needs to be added to the corresponding Virtual Host record. It begins with “add_header” parameter and all of the directives of the header are enveloped by single quotes, like in the example below:

    • add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
  • Apache administrators should update the configuration file with the HSTS header beginning with “Header always set” parameter” and the header’s directives should be enveloped by double quotes. The example is given below:
    • Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"
  • On Microsoft servers running IIS (Internet Information Services) the code, specified below, needs to be added to the central “web.config” file (without the spaces after < signs in the beginning of the lines):

    • < httpProtocol>
      < customHeaders>
      < add name="Strict-Transport-Security" value="max-age=31536000; includeSubDomains; preload "/>
      < /customHeaders>
      < /httpProtocol>
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

SHA-2 server and browser compatibility

In the nearest future all trusted certificates within the industry will be signed with the SHA-2...

What is an ECC (Elliptic Curve Cryptography) certificate?

The situation in information security field is constantly changing. Hack attempts are becoming...

What is the difference between very high, high, medium and low assurance certificates?

The level of the assurance mostly depends on the certificate validation type, the amount of the...

Your site shows 256-bit encryption and my site shows 128-bit, why?

During an SSL/TLS session there are two types of encryption in use: symmetric and asymmetric....

27 Months Maximum Certificate Validity

Starting March 1, 2018, all SSL certificates will have a maximum validity of 27 months. This new...