Implementing HSTS in Apache
Enable the headers module: HSTS is sent as an HTTP header,
sudo a2enmod headers
service apache2 restart in the terminal.
service apache2 restart
Header set Strict-Transport-Security “max-age=31536000; includeSubDomains; preload”
Header set X-XSS-Protection “1; mode=block”
Header always set X-Frame-Options “SAMEORIGIN”
Header always set X-Content-Type-Options “nosniff”
Header always set Referrer-Policy “strict-origin”