RedScore.ai
All posts
Checklists

Next.js security headers checklist

Verify Next.js security headers on production, not in your config files. HSTS, CSP, cookies, and related signals from an outside-in scan.

1 min read · 2026-06-08 · RedScore Research Team

Quick answer

A Next.js security headers checklist verifies what browsers actually receive on your production domain: HSTS, CSP, clickjacking protections, cookie flags, and related hardening signals. RedScore checks the live site from the outside. It does not read your repository or next.config.

Why do Next.js headers matter on production?

You probably set headers in next.config, middleware, or your host settings. Then production drifts. CDN defaults, platform overrides, and a rushed deploy can all change what browsers actually get.

Config files are intentions. Live responses are reality. Scan the deployed hostname.

What is on the Next.js security headers checklist?

  1. HTTPS and HSTS enforced on the production domain.
  2. Content-Security-Policy present and not dangerously loose where visible.
  3. X-Frame-Options or frame-ancestors to cut clickjacking risk.
  4. X-Content-Type-Options to block common MIME confusion.
  5. Referrer-Policy so URLs do not leak more than they should.
  6. Cookie flags like Secure, HttpOnly, and SameSite on live responses.

If any of these fail, fix production first. Arguing about local config can wait.

How do I verify headers without guessing?

Go to /lookup and scan the deployed hostname. Fix the highest-priority gaps, redeploy, then rescan from /lookup.

What does this checklist skip?

Dependency scanning, repo secret hunting, and authenticated route testing. Useful later. Wrong first pass for a team that has not checked public headers yet.

Frequently asked questions

Does RedScore read my Next.js source code?

No. It checks public responses on your deployed hostname. Your `next.config` file can lie. Production cannot.

Can I verify headers after deploying to Vercel?

Yes. Enter the production hostname or custom domain and run an outside-in scan.

What if headers look fine locally but fail in production?

That is common. Hosting, CDN, and middleware differences change live responses. Scan the domain customers hit.

Does this replace dependency scanning?

No. This checklist is for public header posture only. Dependency and secret scanning are separate passes.

Run a free outside-in scan on your domain in about 60 seconds.

Scan domain