How to check your website's security headers for free
Published by CyberLens AI. Last updated .
Security headers are HTTP response fields that tell browsers how to handle your site's content. Missing headers leave your site open to clickjacking, content injection, and data leakage.
Here are three free methods to check yours in under two minutes: browser DevTools, an automated no-signup scan, and a single curl command.
Press F12, open the Network tab, reload the page, click the first document request, and look under Response Headers. Check for Strict-Transport-Security, Content-Security-Policy, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, and Permissions-Policy.
Use curl -sI -L https://yourdomain.com to fetch response headers only. Pipe through grep for the six critical headers. Empty output means all six are absent — a common finding on freshly deployed sites.
Permissions-Policy: restrict camera, microphone, geolocation if unused
Step 5: Fix missing headers and re-scan
Add headers in vercel.json (headers array), Helmet middleware for Express/Node.js, or add_header directives in Nginx. Then re-run the scan to confirm the headers appear and the grade improves.
Vercel: add headers array to vercel.json
Express/Node.js: use helmet() middleware — configures all six in one call
Nginx: add add_header directives in the server block with always
Re-scan after deploy to confirm headers appear in response
Questions and answers
Which security header should I add first?
Start with X-Content-Type-Options: nosniff — it is a single line, universally supported, and has zero risk of breaking anything. Then add Strict-Transport-Security and X-Frame-Options. Leave Content-Security-Policy until last because a misconfigured CSP can break your page.
Does adding security headers break my site?
Most headers (HSTS, X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy) are low risk and rarely break anything. Content-Security-Policy is the exception — a strict CSP can block inline scripts, third-party fonts, or CDN assets you rely on. Use report-only mode first to audit violations before enforcing.
Will security headers affect my website performance?
No. Security headers are small strings sent in the HTTP response and have no measurable performance cost. They are evaluated by the browser before the page renders, not during it.
How often should I check my security headers?
Check after every deployment that touches your server configuration, CDN settings, or proxy layer. Also check after adding new third-party scripts, since those can conflict with an existing Content-Security-Policy. A scheduled monthly scan is a good baseline.
Do security headers protect against all web attacks?
No. Security headers reduce the browser-side attack surface — clickjacking, certain XSS vectors, MIME-sniffing, and protocol downgrade attacks. They do not protect against server-side vulnerabilities, SQL injection, authentication flaws, or misconfigured access controls. Use them alongside server hardening, dependency audits, and application-layer reviews.
Security references
CyberLens AI guidance is informed by established security standards and public vulnerability intelligence.
OWASP Top 10: Common web application security risks used as a baseline reference.