The letter 'S' in the word HTTPS stands for "secure". Website URLs with HTTPS are usually needed to give Google assurance that data transfers on your website are secure and data cannot be intercepted in the middle of the 'journey'. There are two ways to redirect HTTP to HTTPS that you can choose, namely via .htaccess from cPanel.

.htaccess is a multifunctional file contained in websites. You can get a variety of functions from .htaccess, from blocking IP addresses, protecting passwords to converting HTTP to HTTPS. Check out how to redirect HTTP to HTTPS via the following .htaccess. But before that, make sure you have access to manage cPanel.

  1. Login to your cPanel - If you are a MikyHost.com customer, to log in to your cPanel, you can go through the Client Area. In the Client Area, select Service>My services, then select the service product that you have purchased. Then scroll down, in the shortcut section, you can choose one of the cPanel menus. To go to the front page of cPanel, you can select the Home icon or the homepage.
  2. Find file manager menu, then click to open.
    file manager.png
  3. Select public_html, then right click on .htaccess and click “Edit”, then when a popup appears, select “Edit” at the bottom of the popup. However, if you don't find “.htaccess”, click “Settings” on the top right as shown in the image, then put a check mark on “Show Hidden Files (dotfiles)”.
  4. Copy the following code, then paste it in the HTML page of your website.
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  5. After that, don't forget to click Save Changes.
Was this answer helpful? 0 Users Found This Useful (0 Votes)