Skip to content
toolbelt
Back to Guides

The Security Headers Most Sites Still Forget

By ·

Updated

Three headers prevent most of the cheap attacks. They take an afternoon to add and almost nobody has all of them.

What is this tool?

Security headers are instructions from the server about what a page may do. They are cheap and they stop whole categories of attack.

How it works

I parse the header block you paste and check each control against a standard, not just its presence. A CSP with unsafe-inline is reported as weak. HSTS under 180 days is reported as short. Framing protection counts if either X-Frame-Options or CSP frame-ancestors is set.

Example

content-security-policy: default-src 'self'; script-src 'self' 'unsafe-inline'
strict-transport-security: max-age=63072000; includeSubDomains
x-content-type-options: nosniff

The first is present but weakened; the second and third pass.

When to use it

After configuring headers, to confirm they reached the real response rather than a development server. When reviewing a dependency you are about to trust. Before answering a security questionnaire.

Optimization Tips

Roll CSP out in report-only mode first. Enforcing a policy you have not tested will break something on the one page nobody checked. And set HSTS with a short max-age before a long one, because it is hard to walk back.

Frequently Asked Questions

Does this scan a live URL?
No. It analyses headers you paste from curl -I or the network tab.
Why is unsafe-inline flagged?
With it, any injection point is enough to run script. Nonces or hashes are the fix.
Is X-Frame-Options still needed?
frame-ancestors is the modern control; X-Frame-Options is a useful fallback.
What about CORS?
That governs who may read responses, which is a different concern from these protections.

Ready to try it out?

Put this knowledge into practice with our free tool.

Go to Tool

Related tools