How to redirect from http to https using .htaccess ?

By | June 10, 2018

Redirect to https

If you want to redirect each request coming should go to https instead of HTTP without any plugin. then

Step1: Go to root directory of your website and look for .htaccess file. It should be exist in root directory.

Step2: Find the ‘RewriteEngine On’ Add the following code after that.

1
2
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

Here yourdomain stands for website name for which you want to redirect to https.

6 thoughts on “How to redirect from http to https using .htaccess ?

  1. turkce

    Good post! We will be linking to this particularly great content on our site. Keep up the great writing. Caren Ulysses Bobbette

  2. url

    Tһese are rеally enormous ideas іn аbout blogging.
    Үou hаve touched some nice рoints here. Аny
    wɑy kеep up wrinting.

  3. Stephain

    I don’t even know how I ended up here, but
    I thought this post was good. I do not know who you are but certainly
    you are going to a famous blogger if you are not already 😉
    Cheers!

  4. Expressivejoy

    Your style is really unique compared to other folks I have read
    stuff from. Thanks for posting when you’ve got the opportunity, Guess I will just book mark this site.

Leave a Reply