Cyber Security SpaceCYBERSECURITYSPACE.NET
Community
Community HubEventsNewsletterSubmit a Tool
Careers
JobsCareer GuidesFor ProfessionalsCertifications
Learn
Learning PathsEducationGuidesGlossaryTools
News & Threats
NewsBlogThreat LibraryCrypto Security
Small Business
Security CheckupSecurity GuidesComplianceIncident ResponseSecurity Monitor
Join the community
Cyber Security Space

A community for cybersecurity professionals and enthusiasts: careers, learning, and people to learn with. Practical guidance for small businesses too.

Small Business

  • Security Checkup
  • Security Checklist
  • Security Guides
  • Templates
  • Security Tools

Security

  • Website Security
  • Incident Response
  • Compliance
  • Threat Library
  • Crypto Security

Resources

  • Resources
  • News
  • Blog
  • Glossary
  • Jobs
  • Learning

Company

  • About
  • Sources
  • Contact
  • Privacy Policy
  • Terms
  • Disclaimer
  • Editorial Policy
© 2026 Cyber Security Spacecybersecurityspace.net

Blog

Security Headers Explained

What each HTTP security header protects against, sensible starting values, and the order to deploy them without breaking your site.

Published 6 Aug 2026 · Updated 24 Aug 2026 · 2 min read

Short answer

HTTP security headers are response headers that instruct the browser to restrict risky behaviour: Content-Security-Policy limits which resources can load, Strict-Transport-Security forces HTTPS, X-Content-Type-Options stops MIME sniffing, Referrer-Policy limits URL leakage, and Permissions-Policy disables unused browser features.

What each header does

HeaderProtects againstReasonable starting value
Content-Security-PolicyInjected scripts and unexpected resource loadsdefault-src 'self'; object-src 'none'; frame-ancestors 'self'
Strict-Transport-SecurityDowngrade and cookie interception over HTTPmax-age=86400 initially, raised after verification
X-Content-Type-OptionsMIME type sniffingnosniff
Referrer-PolicyLeaking URLs and query stringsstrict-origin-when-cross-origin
Permissions-PolicyUnnecessary browser feature accesscamera=(), microphone=(), geolocation=()
X-Frame-OptionsClickjacking on older browsersSAMEORIGIN (with CSP frame-ancestors)

How should you roll headers out?

  1. STEP 01

    Start with the safe set

    Add X-Content-Type-Options, Referrer-Policy and Permissions-Policy. These rarely break anything.

  2. STEP 02

    Enable HSTS with a short max-age

    Confirm every subdomain and asset works over HTTPS, then raise max-age. Only consider preload once you are certain.

  3. STEP 03

    Run CSP in report-only

    Collect violation reports for a couple of weeks, fix the legitimate ones, then enforce.

  4. STEP 04

    Re-test after every deploy

    New third-party scripts are the most common cause of a CSP that silently gets loosened.

Adding 'unsafe-inline' to script-src removes most of CSP's value. Use nonces or hashes instead.

What headers cannot do

Headers act in the browser. They will not stop server-side injection, credential theft, or a compromised plugin writing to your files. A perfect header grade on a hacked site is still a hacked site — which is why header checks belong alongside file, account and search-side checks rather than replacing them.

Sources

  • HTTP headers reference — MDN Web Docs
  • HTTP Strict Transport Security Cheat Sheet — OWASP

Prefer summary updates? Subscribe to the newsletter.

On this page

  • What each header does
  • How should you roll headers out?
  • What headers cannot do