research paper on depression | statistical problem | http://forums.thewebhostbiz.com/index.php/virtual-report/ How to redirect site from http to https?
Results 1 to 5 of 5

Thread: How to redirect site from http to https?

  1. #1

    Default How to redirect site from http to https?

    Hello friends,


    I Have face A problem In My Website , Please tell me, How to redirect site from http to https?

  2. #2

    Default

    There are many ways you can redirect your website from http to https.

    1. Using .htaccess

    Open your .htaccess file and add this code.

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    After successfully, You will redirect your website from HTTP to HTTPS.

  3. #3
    Join Date
    Jun 2013
    Location
    Forum
    Posts
    1,582

    Default

    You can use 301 redirect. 301 redirect is the most efficient and Search Engine Friendly method for webpage redirection. It's not that hard to implement and it should preserve your search engine rankings for that particular page. If you have to change file names or move pages around, it's the safest option. The code "301" is interpreted as "moved permanently".
    Cheap VPS Hosting | $1 VPS Hosting
    Windows VPS Hosting | Windows with Remote Desktop Access
    Cheap Dedicated Servers | Linux Dedicated Server Hosting

  4. #4

    Default

    In Apache:

    1. Redirect All Web Traffic
    If you have existing code in your .htaccess, add the following:

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

    2. Redirect Only a Specific Domain
    For redirecting a specific domain to use HTTPS, add the following:

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

    3. Redirect Only a Specific Folder
    Redirecting to HTTPS in a particular folder, add the following:

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

    Note: Replace “yourdomain” with your actual domain name wherever required. Also, in case of the folder, replace /folder with the real folder name.
    █ Servers Base - ServersBase.Com
    █ Solutions Tailored To Your Requirements For Unbeatable Agility.
    █ 100% Uptime Guarantee • Fully Manged Servers
    █ SSD Disk Hosting • Cloudlinux OS • LightSpeed

  5. #5
    Join Date
    Feb 2016
    Location
    CA
    Posts
    361

    Default

    You have redirect your old HTTP domain to new HTTPS domain using 301 redirect code.

Similar Threads

  1. What is HTTPS/SSL Update?
    By vinowiz in forum Web Hosting Solutions
    Replies: 3
    Last Post: 04-16-2019, 07:06 AM
  2. What is HTTPS/SSL Update?
    By shoppingswag in forum Web Hosting Solutions
    Replies: 2
    Last Post: 03-27-2019, 06:45 AM
  3. what is the difference between http and https
    By sonyrobin in forum Web Design Solutions
    Replies: 11
    Last Post: 12-06-2018, 06:14 AM
  4. What is https?
    By klifecare in forum Web Design Solutions
    Replies: 12
    Last Post: 11-22-2018, 10:01 AM
  5. How to redirect site from http to https?
    By ninadordev in forum Web Hosting Community
    Replies: 1
    Last Post: 09-02-2017, 06:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •