You publish your site, run vuln (a free check that runs on a public URL), and the header rows in the result table have "Needs work" or "Check" against them. "Other security headers" is the confusing one: the name alone does not tell you what is missing. Many people stop right there and ask what a header even is.
The short version: a security header is a request the server sends to the browser along with the page. You do not have to memorise all six. Add the ones vuln points at. The place to change them is usually your hosting settings or your framework's configuration.
What a security header is
Like a notice taped to a shop door, a site hands the person who opens it a short note every time, before anything else happens. That note is the security header.
A header (an HTTP header) is a line the server sends with the page. Some of them tell the browser what the page is allowed to do. Those are the security headers.
By default, the browser leans towards allowing what it has not been told about. Unless the person who built the site writes down "do not load this", the instruction is simply not there.
The people who lose out when it is missing are the visitors who open your site. When they get fooled, it is the site's trust that drops. If you publish your own app, treat this note as part of your own setup.
They are not written in the HTML. They arrive with the response. The browser reads them before it shows the page and refuses things that are not allowed.
CSP can also be set with a meta tag in the HTML (Referrer-Policy works in meta too). But frame-ancestors, the directive that blocks embedding, does not work in meta. vuln does not use meta for its embedding check either. Setting the header is the normal route.
The six headers vuln looks at
vuln reads these headers from the top page's response. They do not all carry the same weight, and a missing one is treated differently depending on which it is. Here is the whole picture first.
- Content-Security-Policy (CSP): limits where scripts, styles, and frames may be loaded from. Without it, a script that gets into the page does more damage. A common target is
default-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'none'. In vuln, missing means "Needs work"; a weak policy is a separate item. - Strict-Transport-Security (HSTS): makes the browser use HTTPS only for that domain from the next visit on. Without it, public Wi-Fi can still send someone to HTTP. A common target is
max-age=31536000; includeSubDomains. In vuln, a missing or short value shows as "Check". - X-Content-Type-Options: stops the browser from guessing a file's type from its contents. Without it, the browser has more room to treat a file as the wrong type. The usual value is
nosniff. It counts as part of "Other security headers" and shows as "Check". - X-Frame-Options / frame-ancestors: stops other sites from embedding your page in a frame (iframe). Without it, an invisible button can be laid over your page to steer clicks (clickjacking). Use
X-Frame-Options: DENYorframe-ancestors 'none'. In vuln, missing means "Needs work". - Referrer-Policy: decides how much of the "where you came from" information is passed on when someone follows a link. Without it, the path and query of your URL are more likely to reach another site. A common target is
strict-origin-when-cross-origin. It counts as part of "Other security headers" and shows as "Check". - Permissions-Policy: decides whether the page may use features such as the camera, microphone, or location. Without it, permissions for features you do not need stay available. A common target is
camera=(), microphone=(), geolocation=(). vuln treats it as a reference item and does not flag it on its own.
Each one is explained below.
Content-Security-Policy (CSP)
This header limits where scripts, styles, and frames may be loaded from. Think of it as the approved supplier list for the parts your page borrows from elsewhere; that may be an easier way to picture it.
Without it, if a malicious script gets into the page, the browser has fewer limits on what it can do. vuln treats a missing CSP as needs work. It also has a separate item for weaknesses such as 'unsafe-inline', 'unsafe-eval', or * in the policy.
A first step looks like default-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'none'. If you use third-party analytics or fonts, this will block some of them.
So do not enforce it straight away. Start with a Content-Security-Policy-Report-Only header instead. Report-Only only records violations; it does not block anything. The browser console, or the report endpoint you name, fills up with the loads that would have been blocked. Watch it for a week or two, and once nothing unexpected shows up, switch the same value to Content-Security-Policy to enforce it.
Strict-Transport-Security (HSTS)
This header makes the browser use HTTPS only for that domain from the next visit on.
Without it, a public Wi-Fi network can still send someone to http://, where the connection can be read or changed. The site looks normal to the visitor, so they never notice.
HSTS is only accepted over an HTTPS response. It cannot protect the very first request over HTTP, so it is not a complete fix on its own.
max-age=31536000; includeSubDomains is the usual target (one year). Add includeSubDomains only after you have confirmed that every subdomain works over HTTPS. vuln flags a max-age below six months (15552000 seconds).
X-Content-Type-Options
Send this with the value nosniff. It stops the browser from guessing a file's type from its contents.
Without it, the browser has more room to treat a file as a different type than you intended. The impact depends on the page, so vuln treats it as a lower-priority (check) item.
X-Frame-Options / frame-ancestors
This setting stops other sites from embedding your page in a frame (iframe).
Without it, another site can place an invisible button over your page and make visitors click something they did not intend (clickjacking). Login, payment, and settings screens are the most exposed.
Either X-Frame-Options: DENY or CSP frame-ancestors 'none' is enough. Having both does not trigger a finding. If a partner needs to embed you, allow only that partner. vuln does not look at the value itself, such as DENY or SAMEORIGIN; it only checks whether the header is there.
Referrer-Policy
This header decides how much of the 'where you came from' information (the Referer header) is passed on when someone follows a link.
Without it, the destination is more likely to receive the path and query of your URL. In general, that can leak internal URLs or search terms to another site.
strict-origin-when-cross-origin is the usual target. Other sites see only the domain; within your own site, more detail is kept.
Permissions-Policy
This header decides whether the page may use features such as the camera, microphone, or location.
Without it, permissions for features you do not need stay available to the page. vuln treats this as a reference (info) item, not a vulnerability on its own.
Turn off what you do not use, for example camera=(), microphone=(), geolocation=(). Do not disable a feature the site actually uses. This one depends on what your site does.
One more note: the "Other security headers" item also looks at Cross-Origin-Opener-Policy (COOP) and Cross-Origin-Resource-Policy (CORP) as reference items. They separate your page from other origins (a different domain, port, or scheme), and missing them is not a vulnerability by itself.
What can happen without them
Header advice tends to turn into attack talk, so here are just three things in everyday terms.
- Injection: a script can slip into your page through an input field or comment box. CSP narrows how far the damage spreads after that happens.
- Impersonation: a public Wi-Fi network can send someone to a look-alike http:// page. HSTS reduces that room from the next visit on.
- Embedding: another site can lay your page underneath an invisible button and steer clicks. frame-ancestors stops it.
None of these means 'you are in danger right now' just because a header is missing. Think of it as removing one gap at a time.
Where to fix them
You do not change the HTML. You change the side that sends the response. There are three common entry points.
- Hosting settings: Netlify and Cloudflare Pages use a
_headersfile, and Vercel usesheadersin its config. - Framework settings: frameworks such as Next.js and Nuxt can add headers for every page in one place. For Next.js, the headers config is the entry point; for Nuxt, it is routeRules. Nuxt also has a Nuxt Security module as a helper. This depends on how your site is built, so check the docs for your setup.
- A CDN (a network that serves your site from many locations) or reverse proxy such as Cloudflare: these can sometimes rewrite response headers. What is available depends on your plan and setup.
The official instructions for hosting and frameworks are here.
- Netlify's official Headers documentation (English)
- Cloudflare Pages' official Headers documentation (English)
- Vercel's official Headers documentation (English)
- the official Next.js headers config documentation (English)
- the official Nuxt routeRules documentation (English)
- the official Nuxt Security module page (English)
This site does the same thing with its Worker's response headers. The values include Strict-Transport-Security: max-age=31536000; includeSubDomains, X-Content-Type-Options: nosniff, Referrer-Policy: strict-origin-when-cross-origin, and Permissions-Policy: camera=(), microphone=(), geolocation=(). The CSP uses a nonce (a one-off string made fresh for each request) and includes frame-ancestors 'none'. A few pages that show an ad gate use a different CSP, because of how ads are served.
Fixing it without writing code (Lovable, Bolt, and similar)
If you build with a chat-driven tool such as Lovable or Bolt, you rarely open a config file yourself. How the tools work and where the settings live are on their official pages.
The official pages are here.
The vuln result screen can hand you text to paste straight into that chat.
- In the result table, press the "Prompt" button on the row you want to fix. When several items need work, "All prompts" below the table collects them in one go.
- Press "Copy" in the text that opens. "Copied" means it worked.
- Paste it into the Lovable or Bolt chat and ask for the settings change.
The text carries the URL, the item, the result, the impact, the fix, and the evidence the scan observed. If that does not get through, a short request like this also works:
"In the vuln scan, 'Other security headers' came back as Check. Please add X-Content-Type-Options: nosniff and Referrer-Policy: strict-origin-when-cross-origin to the response headers of every page. Show me the file to change and the result after the change."
Three things to watch for when you set them.
- Do not send the same header twice. Setting it in both the host and the framework can produce a value you did not intend.
- CSP breaks pages easily. While it is Report-Only, vuln still counts it as "no CSP", because it is not enforced.
- Add HSTS includeSubDomains only after every subdomain is on HTTPS.
How it shows up in the result screen
Step 3 of vuln shows a summary of the pass rate and a table of checked items. The table has six columns: ID, item, priority, result, area, and evidence and fix (the last column holds both the evidence and the fix).
Seven rows have the area "headers".
- V01 HTTPS / HSTS
- V02 CSP present
- V03 CSP weaknesses
- V04 Clickjacking
- V05 Other security headers
- V14 CORS (reference)
- V17 Cache settings (reference)
The last two are reference items. The six headers in this article show up in the five rows V01 to V05.
Each result is "Pass", "Check", "Needs work", or "Not checked". A missing CSP or missing embedding protection shows as "Needs work"; a missing HSTS or other header shows as "Check". The priority column and the "Needs work only" filter help you decide what to do first. That filter includes "Check" as well as "Needs work", because both are candidates to fix.
The evidence and fix column keeps what the scan observed as key=value. header=x-frame-options means "this header was looked at", request=GET https://... means "this request's response was read", and excerpt=... means "this part of the response header was read". Read the evidence rather than going by the row alone.
Headers alone do not make a site safe
vuln is not a penetration test. It checks the public face of a site from the outside.
Plenty is out of scope: JavaScript that loads late, pages behind a login, APIs, business logic, the finer points of TLS (how the connection is encrypted), and known vulnerabilities (CVEs). What vuln actually fetches is this.
- The top page, following redirects.
- Up to two same-origin JavaScript files found on that page, and up to one source map (the file that maps built code back to the original).
- The fixed paths
/.env,/.git/config, and/.env.production. - One HEAD request to the
http://version, to see whether it redirects to HTTPS.
It does not look at the top page only; it walks this fixed set in the same order every time. Even so, it does not cover the whole site.
It can also be wrong in the other direction. The check observes from the edge (CDN), so what it sees may differ from the origin server's settings. A result is a snapshot of that moment. Run the check again after you make changes.
And a header only reduces the damage. It does not close the hole that lets something in. Finding nothing does not mean the site is safe.
Wrapping up
Six headers sounds like a lot, but you do not need all of them perfect on day one. Start with whatever shows as "Needs work" and take them one at a time. Headers are dull, but they often take a few lines in a config file, which is a decent return for the effort.
For the order, start with CSP and embedding protection (both "Needs work"). They matter most, and they often take only a few lines. Then HSTS, and finally "Other security headers".
The fixes are collected on these pages.
- Other security headers: X-Content-Type-Options, Referrer-Policy, Permissions-Policy, COOP/CORP
- Content-Security-Policy (CSP)
- HTTPS and HSTS
- Clickjacking protection
When you have changed the settings, run vuln again. Besides headers, vuln also looks at cookie attributes and exposed secrets. For the public settings, audit can check display and links too, but audit does not check headers.
This article is based on checking our own site's settings. We did not scan anyone else's site for it. The numbers are recommended values and implementation thresholds, not measurements.