How to redirect user from none www http to www https ?

Scenario:

You want to force all users/client to access your website using https instead of http.

Requirement:
  1. If you do not have a valid SSL Certificate, you will need to buy it. You can check the price here  if you would like to buy it from us. Once you have your own SSL Certificates you will need to installed it at your cPanel account. If you already have one, you can install it directly to your cPanel account.
  2. Make sure your SSL Certificate that you are going to install onto your cPanel has your domain as the CN info. else, you will get SSL Certificate error notification.
Solutions:

You will need to add below script into your .htaccess

    1. Login to your cPanel and click on the File Manager > make sure you tick on "Show hidden files".
    2. Go to your public_html folder and find .htaccess file.
    3. Select .htaccess file and right click on it. Please select Edit option or Code edit option.
    4. Now it will open a new tab with contents inside your .htaccess file.
    5. Copy below script and paste it inside your .htaccess
      <IfModule mod_rewrite.c>
      RewriteCond %{HTTP_HOST} !^www\.
      RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI}$1 [R=301,L]
      RewriteCond %{HTTPS} off
      RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}$1
      </IfModule>
    6. Click save button and test it.
Notes:
    You can custom the script above to fit with your requirement.

Was this answer helpful?

Also Read

How to check your bandwidth usage in cPanel?

Bandwidth devices reads the traffic data that can be displayed in graph. Bandwidth usage is a sum...

My images are broken, or don't show up!

Firstly, check to see whether they are uploaded to our server and are in the correct...

Files fail FTP transfer

When uploading many files at once (a CMS, for example), it is not uncommon for a few of the files...

My webpage is displaying ads

If your website is not pulling up and is instead showing advertisements, the most likely cause is...

Zimbra - Some mailbox did not receive email even when logs says sent

Issue:Some user complaint that did not receive email. however, zimbra.log shows that the email...