The redirection code that should be given to .htaccess file to redirection for the specific domain to use HTTPS. To force all web traffic to use HTTPS insert the following lines of code in the .htaccess file in your website’s root folder. This link is mentioned below to redirect from HTTP to HTTPS.
Link: https://www.servercake.blog/redirect-http-https/