I hope this is not a duplicated question, but i can't find the answer to my question. I'm already using an http to https htaccess redirect, which is as follows:
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
This resolves almost any case, except this one: if i call this URL:
The result is a page with an invalid certificate issue, which is correct because i only have bought certificates for domains with the "www".
My question is: is there a way to create an htaccess redirect from https://domain.com to https with "www"? Or the only solution is buying certificates also for non-www domains?
As an additional note, i specify that we are running a multi-domain website.
Thank you!