How to redirect a domain from http to https via .htaccess Print

  • 0

Step 1: Login to your cPanel account.

Step 2: Select the File Manager option under Files.

Step 3: Navigate to document root folder, select the .htaccess.

Step 4: Add the following codes into .htaccess.


RewriteCond %{SERVER_PORT} 80 [OR]

RewriteCond %{HTTPS} !on

RewriteRule (.*)$1 [R=permanent,L,NC]


Step 5: Finally click the Save changes option.

Step 6: Now your domain will be directed from http to https.

Was this answer helpful?

« Back