webzod
account

Cover both the www and the bare domain in the certificate on Caddy

tls.names.companion_not_covered · effort: minutes

Why it matters

The www and bare versions of the domain answer on HTTPS, but one of them is served with a certificate that is not issued for it. Visitors who type or follow that version see a security warning.

The fix

  1. List both names as site addresses so Caddy obtains a certificate that covers them, and redirect one to the other if you want a single canonical name.
Caddyfile
www.example.com {
	redir https://example.com{uri} permanent
}

example.com {
	# your site configuration
}

The examples use example.com. Replace it with your own domain.

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.