← All posts
Trust · Security headers

What security headers does a website need in 2026?

A website needs six response headers to close most of the browser-level attacks a static page can prevent: Strict-Transport-Security, Content-Security-Policy, X-Content-Type-Options, a frame-control rule, Referrer-Policy and Permissions-Policy. None touch the page's code. Each is a line in the server or CDN configuration that tells the browser what to refuse before it ever renders the response.

Which security headers does a website need?

Six headers cover almost every browser-level attack a response can prevent on its own, with no change to the page's HTML or JavaScript.

HeaderStopsGood default
Strict-Transport-SecurityA downgrade back to plain HTTPmax-age=63072000; includeSubDomains
Content-Security-PolicyInjected and inline scripts runningscript-src 'self'
X-Content-Type-OptionsA response MIME-sniffed into scriptnosniff
Frame-ancestors (CSP) / X-Frame-OptionsClickjacking via a hidden iframeframe-ancestors 'self'
Referrer-PolicyFull URLs leaking to third-party linksstrict-origin-when-cross-origin
Permissions-PolicyEmbedded content misusing camera or miccamera=(), microphone=()

Six headers cover most of the risk. Each is a response-header config change, not an application rewrite.

The six headers worth setting on every response, what each one stops, and a default that works for most sites.

What does a missing header actually cost?

None of these six throw a visible error. A page that has no security headers loads and behaves in exactly the same way as one that has all of them, right up until the attack they exist to stop finds the gap.

Critical

Trackers fire before anyone consents

ObservationGoogle Analytics loads on page load, before the consent banner is answered.
ImpactData collected without consent is a GDPR exposure, and the first thing a privacy review flags. −7 A-Score.
FixGate the tag behind consent, or move it into a consent-mode container.
ReceiptNetwork trace: gtag/js requested at 0.4s; consent event at 3.1s.
A Trust finding as Auditaar reports it: what was missing, what it costs, the fix, and the response that proves it.

How do you check your own headers in two minutes?

  1. Open the browser's devtools, the Network tab, reload the homepage, click the document request, and read the Response Headers.
  2. Confirm Strict-Transport-Security is present with a max-age measured in years, not that the page merely loads over HTTPS.
  3. Read the Content-Security-Policy's script-src value. Its absence, or an 'unsafe-inline' or wildcard source, means it exists without doing much.
  4. Check X-Content-Type-Options is nosniff and a frame-control header (frame-ancestors in the CSP, or X-Frame-Options) is present.
  5. Run a free Snapshot of the homepage. It grades the response against the same rubric and names exactly which header is missing or weak.

Headers are one slice of the Trust pillar

A header scan is the visible part. Auditaar's Trust pillar reads further into the same response and the domain around it:

  • TLS and HTTPS enforcement. Protocol version, certificate issuer and expiry, and whether the HTTP version actually redirects rather than serving a second, insecure copy.
  • Cookie flags. Whether session and tracking cookies set Secure, HttpOnly and SameSite, so a cookie cannot be read or replayed from somewhere it should not be.
  • Front-end library exposure. Known CVEs matched against the script URLs and file banners a page actually loads, not a full dependency scan of code never served to a browser.
  • Malware and phishing reputation. Whether the domain or its key pages are currently flagged on Google's Safe Browsing threat lists, read live, and reported as a floor rather than a certificate of safety.

Does a header that exists mean it actually works?

What does fixing all six look like in practice?

Security headers FAQ

Do security headers affect SEO or AI Visibility?

Security headers are not a direct ranking signal. They sit in the same Trust pillar that an audit scores, along with AI Visibility, findability, and the rest. Missing headers can be seen by anyone who inspects the response, and that includes a security-minded buyer who is reviewing the site.

Can I add a Content-Security-Policy without breaking the site?

Not safely in one step on a page with years of inline scripts and third-party tags. Deploy it in Content-Security-Policy-Report-Only mode first, read what it would have blocked, then tighten script-src to match what actually loads before enforcing it.

Is a passing security-header grade the same as being secure?

No. Headers close a specific set of browser-level attacks and say nothing about the server, the database or the code behind the page. Auditaar's Safe Browsing check is explicit about the same limit: it reports whether a site is currently flagged for malware or phishing, as a floor, never a certificate of safety.

Auditaar grades HTTPS enforcement, TLS, cookie flags and all six security headers against a printed rubric, reads the Content-Security-Policy as an actual policy rather than a header that exists, and checks live for malware and phishing flags, all from a single URL. Run a free Snapshot, or read how to read a website audit.

See it on your own site

Auditaar turns a single URL into a scored, sourced, ordered plan across all six pillars, AI Visibility included.

Related reading