Use HTTPS for my website. Print

  • 49

  1. Login to cPanel and go to File Manager.
  2. On the right side under File Manager, click Settings and check "Show Hidden Files (dotfiles)" and click Save.
  3. Go to public_html or where your web files are located and look for .htaccess.
    Note: If you don't have a .htacess file, you can just add it. To add a file, on the upper left side under File Manager, click "File" to add a .htacess and click "create new file".
  4. To add the code to your .htaccess, press right click on your mouse to .htacess file, click Edit and once the loading page is done, click the Edit again. 
  5. Copy and paste the following codes for force SSL(HTTPS) at the top of .htacess if you have an existing code in your .htaccess.
    RewriteEngine On 
    RewriteCond %{SERVER_PORT} 80 
    RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R=301,L]

    Note 1: If you are using a database in your website, make sure to do "Find and replace" to it from http://yourdomain.com into https://yourdomain.com and if you also declare your domain URL to any parts of your codes.

    Note 2: Make sure to replace the word "yourdomain.com" with your real domain name as it is for a sample display only.

  6. Click save and you're done.
  7. Before accessing your website again, please delete the cache and history to your browser first.
    Note: Once it redirects to HTTPS but not showing the green color, make sure to check the "Note 1" in step #5.

Was this answer helpful?

« Back