Strict-Transport-Security
Forces browsers to only ever connect over HTTPS for the given duration, protecting against protocol-downgrade and cookie-hijacking attacks on the first HTTP request.
X-Frame-Options
Prevents clickjacking by controlling whether your page can be embedded in an <iframe> on another site. In modern browsers, the CSP frame-ancestors directive supersedes this header when both are present — set this as a fallback for older browsers.
X-Content-Type-Options: nosniff
Always on, fixed value. Stops the browser from "MIME-sniffing" a response into a different content type than the server declared — the classic attack this blocks is a file uploaded as an image that actually contains executable script, which some browsers used to sniff and run.
Referrer-Policy
Controls how much of your page's URL is leaked to the next site in the Referer header when a user clicks a link away from your site.
Permissions-Policy
Controls which browser features and APIs your page (and any embedded iframe) is allowed to use.
Cross-Origin-Opener-Policy
Isolates your page's browsing context from cross-origin popups/windows, closing off Spectre-style cross-origin data leaks.
Cross-Origin-Embedder-Policy
Requires every cross-origin resource your page embeds to explicitly opt in via CORP/CORS. This can break third-party embeds (widgets, some images) that haven't opted in — test thoroughly before enabling require-corp.
Cross-Origin-Resource-Policy
Declares who is allowed to load YOUR resources cross-origin — the other side of the COEP coin, and the main defense against cross-origin data-leak attacks like Spectre reading a resource's contents through timing.
This header controlled a legacy browser XSS filter that no modern browser ships anymore — Chrome, Edge, and Safari all ignore it, and Content-Security-Policy is the real replacement. It's included here only for completeness and is left off the generated output unless you explicitly enable it.
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; add_header X-Frame-Options "SAMEORIGIN" always; add_header X-Content-Type-Options "nosniff" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; add_header Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=(), fullscreen=(self)" always; add_header Cross-Origin-Opener-Policy "same-origin" always; add_header Cross-Origin-Embedder-Policy "unsafe-none" always; add_header Cross-Origin-Resource-Policy "same-origin" always;
Scope: Headers Only, Not CSP
This tool covers the non-CSP security headers. For Content-Security-Policy specifically — script/style sources, nonces, and the report-uri directive — use the companion CSP Header Generator.
100% Private
Every header value and config snippet is generated locally in your browser. Nothing you configure here is uploaded or sent anywhere.