3

如果我的服务器设置为重定向键入非 www URL 的用户,例如

example.com -> www.example.com.

我是否需要为两个域获取证书:

example.com, www.example.com
4

1 回答 1

4

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.

于 2016-10-28T16:45:48.407 回答