Free Online Tool

Security Headers Generator

Pick a hardening level and your server type. Get copy-paste ready security header config in seconds.

Audit My Site Check Headers
Pick a level and server, then generate.

What headers does this generate?

All configs include these foundational security headers, scaled by your selected level:

  • Strict-Transport-Security (HSTS): forces browsers to always use HTTPS. Critical to prevent downgrade attacks.
  • X-Content-Type-Options: stops browsers from MIME-sniffing the content type. Blocks one class of XSS.
  • X-Frame-Options: prevents your site from being loaded inside an iframe by other domains. Stops clickjacking.
  • Referrer-Policy: controls how much referrer info leaks when users click outbound links.
  • Permissions-Policy: disables browser features (camera, mic, location) you don't need.
  • Content-Security-Policy (Strict / Maximum only): the most powerful XSS defense. Hardest to configure correctly.
  • Cross-Origin-* (Maximum only): isolates your site from other origins. Required for SharedArrayBuffer / WebAssembly threading.

Pick the right level for your site

  • Basic: the minimum every site should have. Won't break anything. Use this for legacy sites or third-party-heavy CMS like WordPress with many plugins.
  • Strict: recommended for new projects, single-page apps, and any site without complex third-party integrations. Aim for A grade on Mozilla Observatory.
  • Maximum: paranoid mode. Will likely break embedded fonts, analytics scripts, ad networks, and inline styles unless you tune CSP carefully. Test in staging first.

After you apply the config

  1. Deploy the config to your server.
  2. Run our Security Scorecard against your domain.
  3. Re-check at Mozilla Observatory for an external second opinion.
  4. Aim for A grade or above on both.