Knowledgebase

How to redirect user from http to 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 %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}$1
    </IfModule>
  6. Click save button and test it.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

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 and use Calendars and Contacts?

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

I'm receiving a blank page

If your website or web application is displaying nothing but a blank, white page, then chances...

How to solve PHP issue with " ini_set() has been disabled for security reasons"?

Issue: You may facing error saying that "ini_set() has been disabled for security reasons". You...

How to increase memory limit using .htacess

Issue: You might have encountered cannot access to your website with error related to memory...