Copy · paste · reload

Security headers you can actually paste.

Copy-paste blocks for CSP, HSTS, X-Frame-Options, Permissions-Policy and more — for Nginx, Apache, Caddy and Cloudflare. One block per task, plus how to verify it.

15 recipes

The header is simple. The exact syntax for your server isn't.

Each recipe is a focused, copy-paste answer for one header — the exact block for every common server, the safe rollout for CSP, and the curl command to prove it's live.

FAQ

Are these header configs free?

Yes. Every recipe is free to read and copy, with no account or paywall.

Where do these headers go?

In your Nginx/Apache/Caddy config, a Cloudflare Worker, or a _headers file. Each recipe shows every server variant.

Will a CSP break my site?

Deploy Content-Security-Policy-Report-Only first, watch what it blocks, then switch to the enforcing header. See the CSP recipe.

How do I verify the header is sent?

Run "curl -I https://yourdomain". Every recipe ends with the exact curl command.

Open the full interactive site ↗