Security
Headers, transport, and policies that keep visitors safe.
12 topics in this category.
-
HTTPS and TLS
RequiredServe every page over HTTPS using TLS 1.2 or 1.3, redirect plain HTTP to HTTPS, and disable obsolete SSL and early TLS versions on every host you control.
-
HSTS (Strict-Transport-Security)
RequiredHSTS tells browsers to use HTTPS for your domain only, for a long time. Add max-age, includeSubDomains, and preload — but understand it is an irreversible commitment.
-
Content Security Policy (CSP)
RecommendedA CSP tells browsers which sources of script, style, image, and frame content to trust. A good policy stops most XSS and data-exfiltration attacks dead.
-
/.well-known/security.txt
RecommendedA standard text file at /.well-known/security.txt tells security researchers how to report vulnerabilities. It is cheap to publish and dramatically lowers the bar for responsible disclosure.
-
X-Content-Type-Options: nosniff
RequiredThe nosniff header stops browsers from guessing a response's content type. It blocks a class of attacks where a benign-looking file is interpreted as script or stylesheet.
-
Clickjacking protection (frame-ancestors / X-Frame-Options)
RequiredTell browsers who is allowed to embed your pages in an iframe. Use CSP frame-ancestors. X-Frame-Options is the legacy fallback.
-
Referrer-Policy
RecommendedReferrer-Policy controls how much URL information your site leaks when users follow a link or load a subresource. strict-origin-when-cross-origin is the sensible default.
-
Permissions-Policy
RecommendedPermissions-Policy lets you turn off powerful browser features — camera, microphone, geolocation, payment, USB — for your own pages and for any iframes you embed.
-
Subresource Integrity (SRI)
RecommendedSRI adds a cryptographic hash to every third-party script and stylesheet so the browser refuses to run modified files. Essential for any external JS or CSS you depend on.
-
Cookie attributes — Secure, HttpOnly, SameSite
RequiredEvery cookie should be Secure, HttpOnly where possible, and have an explicit SameSite. Use __Host- and __Secure- prefixes for session cookies.
-
DNS CAA records
RecommendedA CAA record tells certificate authorities which of them are allowed to issue certificates for your domain. Cheap to add, blocks a class of mis-issuance attacks.
-
DNSSEC
OptionalDNSSEC cryptographically signs DNS records so resolvers can verify they have not been tampered with. Strong defence in depth, but only with full registrar and registry support.