What are security headers?
When someone visits your website, your server returns the page content plus a set of response headers. Some of those headers are purely technical housekeeping. A handful of them change browser behaviour in ways that reduce the impact of common web attacks — those are the ones people mean by security headers.
Because they are browser-facing, their effect depends on the visitor's browser honouring them. Modern browsers support the headers described here, but an attacker who is not using a browser is unaffected. Treat headers as risk reduction, not as a boundary control.
- They are sent by your server (or CDN, proxy or hosting platform), not written into your page content.
- They apply to what the browser does with your site — framing, script sources, transport, content types.
- They are visible from outside, so anyone can check them, including you.
