I have my site configured on
apache and now I'm trying to set up re-directions correctly.
My site uses wildcard SSL certification and my ssl certificate covers *.mydomain.com. My certificate provider only covers one level subdomain. My site URL is https://level1.mydomain.com, but I want to redirect users that go to https://www.level1.mydomain.com to https://level1.mydomain.com. I setup the redirection from www.level1 to level1, but when I type https://www.level1.mydomain.com on my browser I get
This server could not prove that it is www.level1.mydomain.com; its security certificate is from *.mydomain.com. This may be caused by a misconfiguration or an attacker intercepting your connection.
As I understand, the reason is that www.level1 is a level2 subdomain and my wildcard does not cover that.
What do I need to do? Buy another certificate for www.level1? If yes, how should I configure the virtualhost so both certificates point to the same DocumentRoot folder?