In Apache, add the following parameter in the VHOST site:
Header add Strict-Transport-Security "max-age=15768000"
or
Strict-Transport-Security: max-age=15768000; includeSubDomains
The max-age parameter sets the browser the validity period in seconds that HTTPS will be forced, in which case it will be 6 months. The "includeSubDomains" parameter indicates that this rule will apply to subdomains.
Regards,
Netino