Further protective headers are missing or weak
Your site could be hardened further: with a policy for which scripts may run (Content Security Policy), a rule for what is passed on to other sites (Referrer-Policy), a list of browser features your pages may use (Permissions-Policy) and a long HTTPS lifetime.
Why it matters
These headers limit the damage if something goes wrong, for example when an injected script tries to run or an embedded widget asks your visitors for their location. They take more care to set up than the basic ones, which is why they are fine-tuning.
How to fix it
- 1
Content Security Policy: start in report-only mode, list the hosts scripts may load from, and replace 'unsafe-inline' with nonces or hashes.
- 2
"Referrer-Policy: strict-origin-when-cross-origin" is a safe default.
- 3
"Permissions-Policy: camera=(), microphone=(), geolocation=()" switches off what you do not use.
- 4
Raise the Strict-Transport-Security lifetime to one year (max-age=31536000).
- How serious is it?
- Notice
- Opportunities and things to keep an eye on.
- How much work is it?
- Bigger project
- Needs planning or a developer.
Further reading: web.dev: Strict Content Security Policy
Does your site have this issue?
Check a page for free, or create an account to test your whole website.