Security Headers Builder
Generate copy-paste headers that fix critical SEO audit flags instantly.
Why does Google PageSpeed flag missing headers?
Tools like Lighthouse, Security Headers (securityheaders.com), and GTmetrix check for CSP, HSTS, and X-Frame-Options. Missing them lowers your trust signals and can hurt E-E-A-T SEO scores.
Will a strict CSP break my site?
It can if you use inline scripts or third-party widgets. Start with report-only mode and a report-uri to catch violations before enforcing. Use the "Blog" preset for a safe starting point.
Where do I paste this on Cloudflare?
Workers & Pages → your site → Functions → add a Worker, or use the Transform Rules (HTTP Response Headers) feature for a no-code option. The Cloudflare Workers output above is copy-paste ready.
What's the HSTS preload risk?
Once submitted to browser preload lists, browsers will refuse plain HTTP connections to your domain before even contacting your server. If you ever need to drop HTTPS, you're stuck waiting months to be removed from the list.