HTTP security headers

A reference for every security header that matters in 2026: what it does, the value to use, the mistakes that make it useless, and copy-paste config for nginx, Apache, Laravel, Express and Cloudflare. Each page has a live check for your own site.

Check all your headers at once

Get an A-F grade for your site's security headers with a fix for each one.

Analyzing security headers...

Fetching and evaluating 7 HTTP security headers.

Essential for every site

Recommended hardening

Situational

Deprecated

Cookies are headers too

Session cookies need the Secure, HttpOnly and SameSite attributes on their Set-Cookie header. Check your cookies.

FAQ

What are HTTP security headers?

Response headers that tell the browser how to handle your page: which scripts may run (Content-Security-Policy), whether to force HTTPS (HSTS), whether the page may be framed (X-Frame-Options), and more. They block whole classes of attacks with a few lines of server config.

Which security headers should every site have?

Content-Security-Policy, Strict-Transport-Security, X-Frame-Options (or CSP frame-ancestors), X-Content-Type-Options: nosniff and Referrer-Policy. Permissions-Policy and Cross-Origin-Opener-Policy are cheap extra hardening.

How do I check my security headers?

Use the free security headers check on this page. It fetches your URL once, grades each header and shows the fix. Each header page below also has a single-header check.

Is X-XSS-Protection still a security header I need?

No. It is deprecated and no current browser uses it. Send 0 or omit it, and use Content-Security-Policy.

Setting them in Laravel? See how to fix missing security headers in Laravel and the types of security headers.