Menu

A 10-minute HTTP security headers checklist for small websites
📰

A 10-minute HTTP security headers checklist for small websites

DEV Community: beginners·Yogeshwaran Tech Tools·7 days ago
#QzuI4PYB
#devtobeginners#devto#dev#policy#security
Long article (284 words) — no AI summary yet.
Reading 0:00
15s threshold

Most small sites ship with zero security headers. Adding a handful takes ten minutes and removes whole classes of attacks (clickjacking, MIME sniffing, some XSS). This is the checklist I use for static sites.

The headers

Header What it does Safe starting value

Content-Security-Policy Limits where scripts, styles and images can load from default-src 'self' (relax only what you need)

Strict-Transport-Security Forces HTTPS max-age=31536000; includeSubDomains (once HTTPS works everywhere)

X-Content-Type-Options Stops MIME sniffing nosniff

X-Frame-Options Blocks clickjacking by framing DENY (or use CSP frame-ancestors 'none' )

Referrer-Policy Controls what URL data you leak strict-origin-when-cross-origin

Permissions-Policy Turns off browser features you don't use camera=(), microphone=(), geolocation=()

Cross-Origin-Opener-Policy Isolates your window from popups same-origin

Set them on Netlify

Create a _headers file in your publish folder:

/* Content-Security-Policy: default-src 'self'; img-src…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.