Skip to content

Small business web,
explained since the early 2010s

7eye / Guides / HTTPS and security headers for small sitesPage

HTTPS and security headers for small sites

Security headers are a few lines of server configuration that close off whole classes of attacks.

Section
Blog
Reading time
4 min
Written by
7eye editors
Format
Article

A / 01Start with HTTPS everywhere

Redirect every plain HTTP request to HTTPS, and make sure the redirect is a single hop. Then consider HTTP Strict Transport Security, which tells browsers to use HTTPS for your domain from then on. MDN explains the header and its options in its Strict-Transport-Security reference.

B / 02The short list

The OWASP Secure Headers Project keeps a maintained list. For most small sites the useful set is:

  • Strict-Transport-Security
  • Content-Security-Policy, starting in report-only mode
  • X-Content-Type-Options: nosniff
  • Referrer-Policy
  • A frame-ancestors rule to stop the site being framed

Test after each change. A strict Content-Security-Policy added in one step can break forms and embedded maps.

Read next

  1. 001Leaving Joomla 1.5: a migration outline4 min
  2. 002Five checks before you rebuild an aging Joomla or PHP site4 min
  3. 003Shared, VPS or managed hosting: what a small site actually needs4 min