• Home
  • Category
    • Web Hosting
    • Domain
    • cPanel
    • Billing or Accounts
    • Reseller Hosting
    • Web Design
    • WordPress
    • WHMCS Tutorial
    • SSL Certificates
  • Support
  • Blog
  • Main Site
  • Contact Us
  • Home
  • Category
    • Web Hosting
    • Domain
    • cPanel
    • Billing or Accounts
    • Reseller Hosting
    • Web Design
    • WordPress
    • WHMCS Tutorial
    • SSL Certificates
  • Support
  • Blog
  • Main Site
  • Contact Us
Home/Knowledge Base/SSL Certificates/How to redirect HTTP to HTTPS?

How to redirect HTTP to HTTPS?

510 views 6 May 20, 2022 Updated on December 2, 2024 support

Your site does not appear secure even after SSL is installed, what to do to solve this problem.

Method 1: Force from cPanel First login to cPanel then click Domains from the Domains section.

Then select the check mark option to the right of the domain you want to force. The check mark will not work if SSL is not installed. You must install SSL first.

Method 2: Using https instead of http in WordPress Settings

You can follow the screenshot to forward http to https for WordPress websites.

Login WordPress Dashboad>Settings>General

Method 3: Using a Plugin for WordPress Site

It is an easy way to forward http to https by installing a plugin for a WordPress site. Just follow the instructions bellow.

Login WordPress Dashboard> Plugin>Add New>Search Keyword “Simple SSL”. You will find a Plugin “Really Simple SSL”. Install the plugin and activate it. It will forward http to https. We added a screenshot bellow.

Method 4: Using a .htaccess file when you have access to the root folder

You can use a snippet of code and edit the .htaccess file with a rule for redirecting from http to https

———————————-

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

———————————-

Generally, all websites use an HTTP protocol as their default protocol for handling web requests. but with https, you will get secure data transmission between client’s computer and a web server. This will increase the client’s confidentiality for your website.

Method 5: Using a PHP function for custom php site

You can use a .php function for forwarding to https from http your. Just you have to put small php code in right place where you want the redirection.

< ?php

function redirectTohttps() {

if($_SERVER[‘HTTPS’]!=”on”) {

$redirect= “https://”.$_SERVER[‘HTTP_HOST’].$_SERVER[‘REQUEST_URI’];

header(“Location:$redirect”); } }

?>

Method 6: Using an HTML Meta Tag for Static Page
The above methods are enough for forwarding from http to https. You can also use an HTML Tag if you fail to use the “mod rewrite” rules.

Add the following HTML Code in page header as bellow

< meta http-equiv=”Refresh” content=”0;URL=https://www.yourdomainname.com” />

Method 7: For Blogger, turn on the SSL redirect option from Blogger settings.

Was this helpful?

6 Yes  2 No
Related Articles
  • How to fix connection is not secure Warnings on Your Website ?
  • How to Install an SSL Certificate Using Let’s Encrypt Inside cPanel ?
  • Install SSL Certificate on NGINX
  • Install SSL Certificate on Apache
  • What is SSL Certificate?

Didn't find your answer? Contact Us

SSL Certificates
  • How to redirect HTTP to HTTPS?
  • What is SSL Certificate?
  • Install SSL Certificate on Apache
  • Install SSL Certificate on NGINX
  • How to Install an SSL Certificate Using Let’s Encrypt Inside cPanel ?
  • How to fix connection is not secure Warnings on Your Website ?
All Categories
  • cPanel
  • Billing or Accounts
  • SSL Certificates
  • WordPress
  • Web Hosting
  • Domain

  How to fix connection is not secure Warnings on Your Website ?

Copyright 2025 Orange Soft BD. All Rights Reserved.