如果所有子域都指向网站根目录,是否需要通配符 SSL 证书

发布于 2024-11-01 07:48:07 字数 242 浏览 3 评论 0原文

我对 SSL 证书完全陌生,需要很快购买一个。当子域名发挥作用时,价格似乎会大幅上涨。

我的问题是这样的:

我已经设置了我的网站,以便通过 htaccess 将 username.domain.com 重写为 domain.com?user=username

如果我有我的网站设置为使所有子域都是虚拟的并指向同一位置,我是否需要购买通配符 SSL 证书?

I am completely new to SSL certificates and need to purchase one pretty soon. There seems to be a huge price increase when sub-domains come into play.

My question is this:

I have my site set up so that username.domain.com is rewritten via htaccess to domain.com?user=username

If I have my web site set up so that all sub-domains are virtual and point to the same location, do I need to buy a wild-card SSL Cert?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

慕巷 2024-11-08 07:48:07

如果您希望用户能够通过访问 https://username.domain.com 来查看您的网站并浏览在同一域下(这意味着他们将始终向 https://username.domain.com 发出请求),那么您将需要一个通配符 SSL 证书。如果您刚刚为domain.com安装了SSL证书,那么该请求将没有机会被您的服务器重写。浏览器将首先抛出安全异常,因为证书上的域与正在查看的域不匹配。

如果您不介意让用户通过 https://domain.com?user=username 浏览您的网站,那么您可以让他们首先访问 http:// username.domain.com,然后将其重定向到 https://domain.com?user=username。然后,所有安全浏览都必须在 https://domain.com 下进行,这样就不再需要通配符证书。

当您购买 SSL 证书时,我建议您寻求技术支持并由他们运行您的方案。我发现 Digicert 在这方面非常有帮助(不,除了作为客户之外,我与他们没有任何关系),但我相当确定他们会确认您需要通配符证书。

If you want the user to be able to view your site by visiting https://username.domain.com and browse under that same domain (meaning they'll always be making requests to https://username.domain.com), then you're going to need a wildcard SSL certificate. If you just have an SSL certificate installed for domain.com, then the request will not have the chance to get rewritten by your server. The browser will throw a security exception first, since the domain on the certificate does not match the domain being viewed.

If you don't mind having your users browse your site at https://domain.com?user=username, then you could have them first visit http://username.domain.com and then redirect them to https://domain.com?user=username. Then all secure browsing would have to take place under https://domain.com, and that would eliminate the need for a wildcard certificate.

When you go to purchase your SSL certificate, I would recommend asking for tech support and running your scenario by them. I've found Digicert to be very helpful in this regard (and no I do not have any affiliation with them other than being a customer), but I'm fairly certain they will confirm that you need a wildcard certificate.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文