How to Forward http to https for Your Website?

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” />

3 thoughts on “How to Forward http to https for Your Website?

  1. Cristobal Lea - November 22, 2020 at 1:12 pm

    I got this site from my pal who shared with me concerning this website and now this time I am browsing this website and reading very informative articles or reviews at this place.|

  2. Pattie Chastant - November 22, 2020 at 1:21 pm

    Great post! We will be linking to this great post on our website. Keep up the great writing.|

  3. Rossie Pardini - November 22, 2020 at 1:25 pm

    Hello, I enjoy reading all of your article. I like to write a little comment to support you.|


Leave a Reply