alias www

Hi, I have a problem:
In our organization we bought WiledCard Certificate - *.

Third-level domains are working properly, for example: or etc

But as soon as I want to add an alias in the form of or browsers say that the certificate is not valid.

[i] uses an invalid security certificate.

The certificate is only valid for the following names:

(Error code: ssl_error_bad_cert_domain)[/i]

Apache 2.2

Thank you in advance for your help

I do it in


RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R,L]

RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R,L]

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L][/i]

And what about this domain - *
I have to buy a certificate? or I can create a certificate in the admin panel in Comodo site?

PS. I already have WiledCertificate *


The certificate for * will only work on a domain where the * is replaced with a name.

Putting www infront of that name makes it a second level ie which is why
the certificate errors appear.
Certificates for are not available, to the best of my knowledge.

A wildcard will only work on one level *

I am not sure how you will get around this in your examples.