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


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

  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.

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
    6. Click save button and test it.
    You can custom the script above to fit with your requirement.

Was this answer helpful?

Also Read

How to monitor website's error logs?

First of all, you need to check whether or not the error logging on your account is enabled. To...

How to manage git version control ?

  How to Create a Git Repository with cPanel   Step 1 : Login to cPanel account Step 2 :...

How to manage and use Calendars and Contacts?

The following steps are available for iOS devices only. In order to access your Calendars and...

Failed to upload image or file to wordpress

Issue:There will be possibilities where you will not be able to upload any images or files to...

How to redirect page from html file

Place the following HTML redirect code between the <HEAD> and </HEAD> tags of your...