Caddy's automatic HTTPS handles HTTP-to-HTTPS redirection by default, but you may also need to canonicalise your domain. Generate the correct Caddyfile snippet for both www and non-www redirect rules here.
For any site block with a public hostname Caddy listens on port 80 and redirects to HTTPS on its own.
Redirect the www host to the bare domain with a permanent redirect.
www.example.com {
redir https://example.com{uri} permanent
}Open the Reverse proxy generator
Yes, with auto_https disable_redirects in the global options, but it is rarely a good idea.