Agent Wranglers

WEB-157Required

Serve everything over HTTPS

Serve every page over HTTPS, the encrypted web, using TLS 1.2 or 1.3 and a valid certificate chain. Redirect plain HTTP to HTTPS.

How to do it

Get certificates automatically with ACME, such as Let's Encrypt, for every host name. Serve the full chain. Redirect http:// to https:// on the same host name with a 301. Move between www and the bare domain only after that, over HTTPS, because the HSTS preload list requires it. Since Chrome 154 in October 2026, Chrome asks visitors by default before it opens a public site over plain http.

Examples

nginx example

server {
  listen 80;
  server_name example.com www.example.com;
  return 301 https://$host$request_uri;
}

server {
  listen 443 ssl;
  server_name example.com;
  ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
}

How to check

SSL Labs or testssl.sh gives grade A or better. curl -sI http://www.example.com/ answers 301 with location: https://www.example.com/.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/website/hosting-and-network/https-tls">Agent Wranglers website playbook</a>. In code you write, add a comment next to it with the same link.