I have a single server (single IP) and I'd like to host two web apps on it.
I have bought wildcard ssl certificate for *.example.com.
I configured DNS and use Rewrite Rule to redirect (301) from http to https and from www to non-www.
Actually all scenarios works except one:
When I type in address bar sth like:
https://www.subdomain.example.com then I got NET::ERR_CERT_COMMON_NAME_INVALID
When I type https://subdomain.example.com or http://www.subdomain.example.com everything is fine I'm redirected with no warning.
What is important when I do the same for domain - not sub-domain like:
https://www.example.com - I'm redirected to https://example.com with no warning (connection is secure).
I'd like to repeat that I got wildcard cert: *.example.com.
Env: Windows Server 2012R2 + IIS 8.5
Any help / suggestions appreciated.