'referrer policy header not working apache .htaccess

using securityheaders.io website, I can't get referrer policy header recognized in apache .htaccess.

This is my code in htaccess

 <IfModule mod_headers.c>
    Header set Referrer-Policy "no-referrer"
 </IfModule>

The site still says missing referrer policy. Is this not the right code to use?



Solution 1:[1]

You must add like this in your htaccess file

Header always set Referrer-Policy "same-origin"

Solution 2:[2]

Referrer-Policy: no-referrer Referrer-Policy: no-referrer-when-downgrade Referrer-Policy: origin Referrer-Policy: origin-when-cross-origin Referrer-Policy: same-origin Referrer-Policy: strict-origin Referrer-Policy: strict-origin-when-cross-origin Referrer-Policy: unsafe-url

Referrer-Policy: same-origin is usally recommended.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy

Solution 3:[3]

This worked for me:

Header always set Referrer-Policy "no-referrer" 

Sources

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

Source: Stack Overflow

Solution Source
Solution 1 Murugan Vellaisamy
Solution 2 PatrikI
Solution 3 adiga