Security headers are instructions that a web server sends along with a page to tell the browser which extra protections to switch on for that site. The visitor never sees them, but the browser reads them before it shows the page and acts on them.
How security headers work
Every time a browser asks for a page, the server answers with the page itself and a set of headers: short lines of text with a name and a value. Most headers are practical, such as the type of content or how long it may be cached. Security headers are the ones that limit what the page, or other sites, are allowed to do.
The six headers to know
Six headers come up in almost every review, and the OWASP HTTP Headers Cheat Sheet gives a recommended value for each. Strict-Transport-Security, known as HSTS, tells the browser to use HTTPS for every visit. Content-Security-Policy restricts where the page may load scripts and other content from, which limits the damage injected code can do. A Content Security Policy does the most of the six and is the hardest to get right.
X-Content-Type-Options, with the value nosniff, stops the browser from guessing the type of a file, so that an upload that looks harmless is not treated as a script. X-Frame-Options controls whether other sites may show the page inside a frame. That is the basis of clickjacking, where a visitor is tricked into clicking something on a page they cannot see. Referrer-Policy limits how much of the current address is passed along when the visitor follows a link to another site. Permissions-Policy switches off browser features the site does not use, such as the camera, the microphone or location.
One older header, X-XSS-Protection, is no longer recommended. OWASP advises not to set it, or to turn it off explicitly.
What a missing header means
A missing security header is not a leak. Nothing is exposed because a header is absent. What is missing is a layer: if another mistake exists, such as a way to inject a script into the page, the header would have limited what that mistake could be used for. That is why headers appear in checks and reports as something to switch on, not as an emergency.
Where they are set
Headers are configured where the app is hosted, not in the pages themselves. For apps generated with AI app builders this is easy to overlook, because the builder produces the code of the app and the headers live one level above it.
You can see the headers a site sends in the network tab of the developer tools in a browser. A check that reports all six as present shows that they were sent on that day. It does not show that their values are well chosen. A Content-Security-Policy in particular can be present and still allow almost everything.