invalid security certificate and domain names

我怕爱的太早我们不能终老 提交于 2019-12-23 12:35:42

问题


I recently purchased a security certificate for a website valid for www.example.com but not for *.example.com (wildcard version - more expensive) The problem i have now is that although users can type http://example.com , the secure version (ssl enabled pages) https://example.com raises the invalid certificate exception - which is totally understandable.

How can i redirect https traffic to the www.example.com version before the request actually hits the server? i tried url rewritting and redirects without any luck. any ideas ?

The website is built using ASP.NET and Hosted on an IIS 7 server.

Thanks!


回答1:


Spend another few bucks for a (~$30 at Godaddy) for a cheap cert for the shorter domain example.com.

It seems unlikely that a significant number of users users are typing in https://example.com. If they are typing in an address they are probably using http:// or nothing. You should be able to setup 2 virtual hosts, one for http://example.com/, and one for http(s)://www.example.com. Redirect everything from example.com to www.example.com

SSL is negotiated first, so there isn't really anything you can do to redirect connections from https://example.com to https://www.example.com if https://example.com has an invalid certificate.



来源:https://stackoverflow.com/questions/449212/invalid-security-certificate-and-domain-names

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!