Skip to content

Gift shoppingAn unfamiliar online shop? Check it for free before you pay.Check a shop

Security headers check

Which security headers should a website send, and how do you check them?

Short answer

Security headers are instructions a website adds to its response to tell the browser what not to allow on the page. Tegmia reads seven of them from your website’s response — Strict-Transport-Security, Content-Security-Policy, X-Content-Type-Options, Referrer-Policy, protection against being framed, Permissions-Policy and the headers that give away the server version — plus the flags on cookies. None of them fixes a vulnerability; they are cheap measures that reduce the impact of a flaw that happens later.

Part of the check Headers and HTTPS configuration.

What it is

Content-Security-Policy is the only one of the seven that needs preparation, and also the only one that stops an injected third-party script. It is introduced in report mode first; enforcement is switched on later.

Strict-Transport-Security closes the gap in the first connection; it has its own page, because it is the one you can break the most with.

The rest is a one-line setting each: nosniff, Referrer-Policy, frame-ancestors or X-Frame-Options, Permissions-Policy and a quieter Server header.

For cookies it is not about a header but about flags: Secure, HttpOnly and SameSite. A sign-in cookie without them is the shortest route from a flaw on the website to a stolen session.

How Tegmia measures it

What the check actually does, with the thresholds at which it reports a finding.

  1. We send at most five GET requests to the home page (each redirect is one, at most four) and one more to http://. We discard the response body as soon as the headers arrive — we do not download the website’s content.
  2. We resolve every redirect hop again and check that it points to a public address. A redirect cannot lead us into an internal network.
  3. We report absence: http.csp_missing, http.xcto_missing (or an unexpected value instead of nosniff), http.referrer_policy_missing, http.permissions_policy_missing.
  4. We accept protection against framing in two ways — the X-Frame-Options header or the frame-ancestors directive in CSP. If both are missing, we report http.frame_protection_missing.
  5. We report the Server and X-Powered-By headers only when they contain a version number (http.server_banner_verbose). The server’s name alone we do not count as a finding.
  6. For every cookie in the response we read the flags and report a missing Secure, HttpOnly and SameSite separately, with the cookie’s name in the evidence.
  7. The whole set of headers we received and the redirect chain are part of the evidence. We identify ourselves as Tegmia-Checker and do not reuse connections.
  8. When the home page answers with a server error (5xx), a refusal or a limit (401, 403, 407, 408, 425, 429), we do not read the headers: they belong not to the website but to whoever answered. The run ends as a measurement error and the findings stay as they were.
  9. When everything is fine, we record http.headers_ok, so you can see that the check ran and found nothing.

What this does not measure

  • We read the domain’s home page, not the whole website. Another section may have different headers.
  • We do not evaluate the content of the CSP — we cannot tell a policy that really protects from one that is there for show with “unsafe-inline”.
  • We only see the cookies the website sends to a signed-out visitor on the home page.

The findings this can lead to

Straight from the catalogue. You will see the same text in the report.

Content-Security-Policy is missing

Medium

http.csp_missing · Headers and HTTPS configuration

CSP is the most effective defence against injected third-party scripts (XSS) and against forged content from another domain. Without it, such an attack has its full effect.

What to do: Introduce CSP step by step: first in Content-Security-Policy-Report-Only mode, review the reports, then switch to enforcement.

Default severity medium: Plan it within a month. On its own it is not enough for an attack, but it makes one easier. The full rule in the catalogue

Protection against embedding in another site's frame is missing

Low

http.frame_protection_missing · Headers and HTTPS configuration

Another site can show your content inside its own frame and overlay it so that the user clicks on something other than what they see (clickjacking).

What to do: Add the frame-ancestors self directive to CSP, or the header X-Frame-Options: SAMEORIGIN.

Default severity low: Fine-tuning. No immediate risk; fixing it improves the overall picture. The full rule in the catalogue

X-Content-Type-Options is missing

Low

http.xcto_missing · Headers and HTTPS configuration

Without this header, the browser may guess the file type and run something as a script that is not meant to be one.

What to do: Add the header X-Content-Type-Options: nosniff.

Default severity low: Fine-tuning. No immediate risk; fixing it improves the overall picture. The full rule in the catalogue

Referrer-Policy is missing

Low

http.referrer_policy_missing · Headers and HTTPS configuration

The browser may send other sites the full address the user came from. Addresses often contain internal identifiers and even tokens.

What to do: Add Referrer-Policy: strict-origin-when-cross-origin.

Default severity low: Fine-tuning. No immediate risk; fixing it improves the overall picture. The full rule in the catalogue

Permissions-Policy is missing

Information

http.permissions_policy_missing · Headers and HTTPS configuration

The header limits which sensitive browser features (camera, microphone, location) the page and embedded third-party content may use.

What to do: Add Permissions-Policy and switch off the features the site does not need, for example camera=(), microphone=(), geolocation=().

Default severity information: Just a fact we found about your setup. It is not a fault. The full rule in the catalogue

The server reveals the exact software version

Information

http.server_banner_verbose · Headers and HTTPS configuration

A version in a header is not a vulnerability in itself, but it saves an attacker work when looking for targets. Hiding it costs little.

What to do: Reduce the Server and X-Powered-By headers to a generic value, or switch them off.

Default severity information: Just a fact we found about your setup. It is not a fault. The full rule in the catalogue

Cookie without the Secure flag

Medium

http.cookie_missing_secure · Headers and HTTPS configuration

The browser sends such a cookie even over an insecure connection. If it is a login cookie, it can be stolen by eavesdropping.

What to do: Add the Secure flag to all cookies.

Default severity medium: Plan it within a month. On its own it is not enough for an attack, but it makes one easier. The full rule in the catalogue

Cookie without the HttpOnly flag

Medium

http.cookie_missing_httponly · Headers and HTTPS configuration

JavaScript on the page can read such a cookie. After a successful XSS attack, that means the login can be stolen directly.

What to do: Add HttpOnly to cookies that JavaScript does not need to read (typically login cookies).

Default severity medium: Plan it within a month. On its own it is not enough for an attack, but it makes one easier. The full rule in the catalogue

Cookie without the SameSite flag

Low

http.cookie_missing_samesite · Headers and HTTPS configuration

Without SameSite, another site can trigger an action in your name (CSRF).

What to do: Set SameSite=Lax, and SameSite=Strict for sensitive operations.

Default severity low: Fine-tuning. No immediate risk; fixing it improves the overall picture. The full rule in the catalogue

A typical misconfiguration

Headers set in one place and missing in another. The website runs behind a reverse proxy or CDN, the headers are added in the application — and static files, error pages or the admin area take a different route where nobody adds anything.

The second typical situation: CSP is deployed straight in enforcement mode and breaks the payment button, the map or the analytics. After an hour it is switched off and nobody ever comes back to it. That is why it is introduced in Report-Only mode.

How to fix it

Specific steps, in the order in which they make sense.

  1. 01Find out where headers can be set for the whole website — in the web server, in the proxy or in the application. Settle on one place.
  2. 02Add the cheap headers: X-Content-Type-Options: nosniff, Referrer-Policy: strict-origin-when-cross-origin, X-Frame-Options: SAMEORIGIN and Permissions-Policy with the features the website does not need switched off.
  3. 03On cookies, add Secure, and HttpOnly on all of those JavaScript does not read. Set SameSite to Lax, and to Strict for sensitive operations.
  4. 04Remove the version number from the Server and X-Powered-By headers, or turn them off.
  5. 05Only then CSP: deploy Content-Security-Policy-Report-Only, collect reports for a few days and add the sources the website legitimately uses.
  6. 06Then switch CSP to enforcement and have what the server actually answers checked — not what the configuration says it should answer.

What it looks like

The values as you will write or see them.

The file type is not guessed

X-Content-Type-Options: nosniff

Where the user came from

Referrer-Policy: strict-origin-when-cross-origin

What the website does not need is switched off

Permissions-Policy: camera=(), microphone=(), geolocation=()

Check it on your own domain

We read only what the domain has published.

The scan reads the domain’s public records and configuration and shows the result of this check for you, including the evidence we based it on.

Situations this answers

Related checks

What goes with it and is usually done together.

  • HSTS check

    Which gap the Strict-Transport-Security header closes, what max-age value we expect and when not to turn HSTS on.

  • HTTP to HTTPS redirect check

    How we measure that a website does not stay on an unencrypted connection, and why the www variant is so often forgotten.

  • SSL certificate check

    What one TLS connection reveals about a certificate: the issuer, the domain names, the key strength and the protocol version.

Last updated 3 November 2026. We write this page by hand and correct it when what we measure changes. Found a mistake? Tell us via the contact page.