Understand what your security headers control

  • Content-Security-Policy

    Restricts the scripts and other resources a page may load.

  • Strict-Transport-Security

    Tells browsers to use HTTPS for later requests.

  • X-Frame-Options

    Restricts whether another page can embed yours.

  • X-Content-Type-Options

    With nosniff, tells browsers to respect declared content types.

  • Referrer-Policy

    Controls how much information about the referring page goes with a request.

  • Permissions-Policy

    Limits which browser features a page and its embedded frames may use.

  • Cross-origin isolation policies

    Cross-Origin-Opener-Policy, Cross-Origin-Embedder-Policy and Cross-Origin-Resource-Policy control how your pages and files interact with other origins.

The OWASP header guide explains these settings. Choose values for the way your site works.

Add missing security headers where your pages are served

  1. 1

    Find where your headers are set

    Review your hosting settings, CDN rules and framework configuration. Find which layer sends the header before adding another copy.

  2. 2

    Inspect the response visitors receive

    After changing the setting, inspect the live response. Check a range of pages, including error responses, rather than assuming the home page represents the whole site.

Frequently asked questions

Are security headers the same as an SSL certificate?

No. A certificate helps a browser authenticate the server it reaches over HTTPS. Response headers control how the browser handles the page.

Can security headers break my website?

Yes. A strict Content Security Policy can block a script the page needs, and Cross-Origin-Embedder-Policy blocks cross-origin files that don't grant permission. Check the parts of the page that rely on them before enforcing a stricter value.

  • Website security

    Catch leaked API keys and exposed files before someone uses them against you.

  • Content Security Policy

    Read your content policy and investigate blocked scripts before tightening it.

  • HSTS

    Understand how browsers remember HTTPS before extending that rule to every subdomain.

  • Clickjacking

    Set framing rules so another site can't freely place your page behind its own controls.

  • Subresource Integrity

    Use integrity hashes to tie an outside script or stylesheet to the contents you reviewed.

  • Security headers that are not your CSP

    What HSTS, Referrer-Policy, Permissions-Policy, and the cross-origin isolation headers actually prevent, how to verify each one, and which are noise.