'__Headers in .htaccess-file to secure website__

I wish you all a good day and a nice start in the Weekend :)

I set the next Headers in htaccess-file:

# Security Headers
<IfModule mod_headers.c>
   

 -  Header set Strict-Transport-Security "max-age=31536000" env=HTTPS
 -  Header set X-Permitted-Cross-Domain-Policies "none"
 -  Header set X-XSS-Protection "1; mode=block"
 -  Header set X-Frame-Options "deny"
 -  Header set X-Content-Type-Options "nosniff"
 -  Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
 -  # Header set Content-Security-Policy ...
 -  Header set Referrer-Policy "no-referrer"
 -  Header set Feature-Policy "geolocation 'self'; vibrate 'none'"
</IfModule>

but when i scan my Website on "securityheader" it shows all the headers in red color. It means the website is not secure.

I would be so thankful, if someone likes/can show me the error?

Thank you and Best regards



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source