Redirect mapped sub-domain

I have a domain with SSL certificate only for the non-www version(, and mapped that to a sub-domain on a multisite.

The issue is when I try to reach the domain(with www) either at or I get an invalid certificate error. While entering the domain without www works properly.

Is there any way I could set a redirect from the multisite(or htaccess) for the mapped domain, that will send all requests for to with SSL) version.

Note, tried redirect from cpanel and the following htaccess rewrite but doesn't help:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$$1 [L,R=301]