Home/Glossary/HTTP Security Headers

HTTP Security Headers

Response headers that enable browser security protections against common web attacks.

Web SecurityAlso called: "security headers", "http headers"

Security headers instruct browsers to enforce policies that mitigate XSS, clickjacking, and other threats.

Essential headers

  • Content-Security-Policy (CSP): Controls which resources can load.
  • Strict-Transport-Security (HSTS): Force HTTPS for all connections.
  • X-Frame-Options: Prevent clickjacking by blocking iframes.
  • X-Content-Type-Options: Prevent MIME sniffing attacks.
  • Referrer-Policy: Control how much referrer information is shared.

Implementation

  • Configure headers in web server (Nginx, Apache, IIS).
  • Test with browser dev tools and online scanners.
  • Start with report-only mode for CSP to avoid breaking functionality.