我是否真的需要2个SSL认证才能将裸域重定向到www? [英] Do I really need 2 SSL certifications to redirect a naked domain to www?

查看:83
本文介绍了我是否真的需要2个SSL认证才能将裸域重定向到www?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,我只想与 https://www-prefix 一起使用. 我必须在我的web.config(Azure网站上的asp.net MVC)中配置2个url重定向,一个从http到https,一个从裸域到www.domain.

I have a website, which I only want to be used with the https://www-prefix. I have to 2 url-redirects configured in my web.config (asp.net MVC on Azure websites), one from http to https, and one from naked domain to www.domain.

最初,我仅为我的www.domain.com购买了SSL证书,但是当有人进入裸域时,他会在重定向发生之前得到浏览器警告/阻止.最终,我购买了第二个SSL证书.同样适用于我的裸域,并且现在都可以使用,但是我不禁要问,在这种情况下,我真的需要购买2个证书吗?

I initially bought an SSL certificate for my www.domain.com only, but then when someone would enter the naked domain, he would get a browser warning/block before the redirect could even happen. Eventually I bought a 2nd SSL cert. for my naked domain as well and it all works now, but I can't help wonder, do I really need to buy 2 certificates for this scenario?

推荐答案

是的,如果您希望能够重定向手动输入裸名的用户,则确实需要一个对两个域有效的证书具有https协议的域.

Yes, you really need a certificate valid for the two domains if you want to be able to redirect users who manually enter the naked domain with the https protocol.

它可以是两个证书,但也可以是包含两个域的一个证书.大多数SSL供应商免费提供裸域.

It can be two certificate, but it can be one certificate containing the two domains. Most SSL vendors include for free the naked domain.

(而且,有让我们加密可以免费为您提供证书"的内容.)

(And, there is Let's encrypt that can give you certificate for free.)

此外,通过拥有裸域证书,您可以使用HSTS(包括子域),从而保护您的所有子域不受SSL剥夺.

Furthermore, having a certificate for the naked domain allow you to use HSTS including sub-domains, which can protect all your sub-domains against SSL strip.

这篇关于我是否真的需要2个SSL认证才能将裸域重定向到www?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆