Caddyfile with TLS

Caddy is serving main domain normally with the below configs.

https://domain.com 		    {
	tls     info@domain.com
	proxy / https://127.0.0.1:10383 { transparent }
    					    }

Please advise on what kind of TLS certificate (wildcard type?)
If yes, trying to access https://www.domain.com results in ERR_SSL_PROTOCOL_ERROR

Please note that, the above configs works fine with subdomains.

That looks like a Caddy v1 config. Please upgrade to Caddy v2. Caddy v1 is now EOL (no longer maintained).

If you make a site block with only domain.com, Caddy will only issue a certificate for domain.com. If you want a certificate for www.domain.com as well, then specify both, separated by a comma:

Caddy can issue wildcard certificates if you need it, but it involves extra work, i.e. enabling the ACME DNS challenge:

This topic was automatically closed after 30 days. New replies are no longer allowed.