如果我的服务器设置为重定向键入非 www URL 的用户,例如
example.com -> www.example.com.
我是否需要为两个域获取证书:
example.com, www.example.com
如果我的服务器设置为重定向键入非 www URL 的用户,例如
example.com -> www.example.com.
我是否需要为两个域获取证书:
example.com, www.example.com
Yes. If a user types in https://example.com, the TLS handshake between their browser and your server happens before the redirect. Users will see an error message in their browser indicating the site's certificate is invalid.
If you're using Let's Encrypt you can include both www and non-www domains in the same certificate. Most other certificate vendors also do this on request.