webzod
account

Decide whether to add includeSubDomains on Apache

tls.hsts.no_include_subdomains · effort: a project

Why it matters

Without includeSubDomains, subdomains are not forced onto HTTPS by the main domain's policy. Adding it is a choice because it also locks every subdomain, including old or internal ones, to HTTPS.

Risky change. A wrong setting here can take your site or your mail offline. Follow the stages in order, test each one, and keep a way back.

The fix

  1. Edit the existing Header line as in the generic steps, run apachectl configtest and reload.
  2. Stage the change. Start with includeSubDomains at max-age=300, test several subdomains in a browser, and only then raise max-age as in the generic steps.
/etc/apache2/sites-available/site-ssl.conf
Header always set Strict-Transport-Security "max-age=300; includeSubDomains"

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.