Sat - Thu 9:00 - 17:30

Support Always Open

+88 0178 2391 434

24/7 Customer Support

Client Login

Please Click to Login

How to Forward http to https for Your Website?

We mentioned five methods to forward http to https for your website bellow:

Method 1: 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 2: 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 3: 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 4: 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 5: 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” />

Share:

Facebook
Twitter

More Posts

Send Us A Message