Redirect From HTTP to HTTPS

Hello Everyone,
I have Angular Universal App and issued SSL and has 89 days but the problem when I entered website like http://mydomain.com or https://mydomain.com the browser will shown page not found and if i entered my domain like this http://www.mydomain.com it will redirect to https and website will open ,
The below is .htaccess file content

Rewrite Rules Added by CyberPanel Rewrite Rule Generator

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

End CyberPanel Generated Rules.

could you please help me to solve this issue ,
Thanks in advance for your efforts and support .

Please add a CNAME record to your DNS “Name = www.mydomain.com” and “Value=mydomain.com”. This will redirect all www subdomain traffic to your root domain and your existing rewrite rule will redirect all HTTP traffic to HTTPS.

Thank you i will try to add it , already i have been added it like A for both mydomain.com and www.mydomain.com with value equal server IP,
Thanks For your support and efforts