问题
I created Wildcard certificate to support my site domain and subdomains. The new certificate works for my subdomains (e.g www.mydomain.com , sub.mydomain.com) But when I try to get to mydomain.com I get certificate warning: "the certificate is only valid for *.mydomain.com"
Is it a problem with my configuration or just the Wildcard certificate doesn't support it?
回答1:
For supporting both example.com
and subdomain.example.com
the certificate needs to include both *.example.com
and example.com
as subject alternative names. I assume that the last one is missing from your certificate.
回答2:
I guess you have purchased wildcard ssl certificate from thawte or symantec, which does not support equally www and non-www. In the past, I purchased thawte wildcard certificate and faced the same type of issue. I just discussed with my vendor to get the solution, they gave me technical support instantly and suggest alphassl wildcard - https://www.ssl2buy.com/alphassl-wildcard.php. After that, I switched over to alphassl wildcard that works fine on my both domain names mydomain.com, www.mydomain.com as well anything.mydomain.com.
来源:https://stackoverflow.com/questions/28591792/wildcard-certificate-not-valid-for-mydomain-com