Fine-Tune Website

Redirect my cPanel website to HTTPS

After your SSL certficate is installed on your hosting account, there are some modifications you’ll need to make to your .htaccess file. Adding a few lines to your .htaccess file will automatically redirect your visitors to the HTTPS version of your website.

 Note: These instructions do not apply to WordPress installed on cPanel. For more information, see Redirect my WordPress website to HTTPS in cPanel hosting after my SSL certificate is installed

  1. Log in to your Mice Web Hosting account and open your product. (Need help opening your product?)
  2. Click File Manager. Once the file manager loads, click Settings.
  3. Make sure that Show Hidden Files (dotfiles) is checked, and click Save.
  4. Click on public_html, and open your .htaccess if you already have one. If not, click File+, name the file .htaccess and click Create New File.
  5. Select the .htaccess file, and click Edit.
      • If you just created your .htaccess file, use the following code to set up the URL redirect to the HTTPS version of your website: 
        RewriteEngine On 
        RewriteCond %{SERVER_PORT} 80
        RewriteCond %{HTTP_HOST} ^(www\.)?coolexample\.com
        RewriteRule ^(.*)$ https://www.coolexample.com/$1 [R,L]
        
      • If your .htaccess file already exists in your hosting account, do not duplicate ReWriteEngine On. Insert the lines that begin with ReWriteCondand RewriteRule directly after the already existing ReWriteEngine On.
    Required: You need to replace coolexample.com with your domain name for the sample code to work.
  6. Click Save Changes and Close. That’s it!

Visit your website and you’ll automatically be re-directed to the HTTPS version.

We provide these instructions as a courtesy, but you may need to make other changes to get the redirect working if you already have a .htaccess file.