Why This Matters for Search & AI Visibility
If both www and non-www return 200 OK without redirecting, search engines split your PageRank authority and index duplicate URLs across both hosts.
Every domain has four protocol/subdomain variants: http://domain.com, http://www.domain.com, https://domain.com, and https://www.domain.com. Exactly one should return 200 OK as your canonical origin, while the other three should 301 redirect to it in a single hop.
If both www and non-www return 200 OK without redirecting, search engines split your PageRank authority and index duplicate URLs across both hosts.
Configure your edge reverse proxy (Caddy, Nginx, or Cloudflare) to 301 redirect both http:// and the non-canonical subdomain directly to your canonical https:// host.