What are security headers?

Updated May 6, 2026

Short answer

Security headers enhance web security by instructing browsers how to behave.

Deep explanation

Headers like CSP, HSTS, X-Frame-Options reduce attack surface.

Real-world example

Preventing clickjacking using X-Frame-Options.

Common mistakes

  • Not configuring headers properly in production.

Follow-up questions

  • What is HSTS?
  • What does CSP do?

More Web Security interview questions

View all →