How to redirect site from http to https?

Author Topic: How to redirect site from http to https?  (Read 1374 times)

Offline AdityaM7Topic starter

  • Trade Count: (0)
  • Newbie
  • *
  • Thank You 0
  • Posts: 1
  • Karma: 0
How to redirect site from http to https?
« on: 08-08-2017, 01:58:57 »
I have purchased SSL certificate for my site.

But I have more than 1 site purchased from go daddy. So whenever I add htaccess file to my site, the other sites, stop working.

What should I do?

I have talked many times to customer support but this problem never gets solved.

My site is working on both URLs http & https.

Suggest something.


Offline Sojan Babu

  • Trade Count: (0)
  • Semi-Newbie
  • *
  • Thank You 0
  • Posts: 15
  • Karma: 0
Re: How to redirect site from http to https?
« Reply #1 on: 08-11-2017, 01:58:46 »
Using the following code in your .htaccess file automatically redirects visitors to the HTTPS version of your site:

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


Offline seoanubhavgarg

  • Trade Count: (0)
  • Newbie
  • *
  • Thank You 0
  • Posts: 5
  • Karma: 1
  • Gender: Male
  • SEO & Digital Marketing Consultant
    • SEO Service in India
Re: How to redirect site from http to https?
« Reply #2 on: 08-11-2017, 06:06:46 »
Hello AdityaM7,

I was facing the same issue with SSL for my DataEntryAdroits domain but this issue has been resolved.

One Note for you here buddy - .htaccess does not work in GoDaddy, you need to upload the web.config file.

But before that, please see the below points to check if your domain fulfills the criteria.

First, add SSL Verified seal on your website footer - See the image as attached

Second: remove all images that are being called on your website from any third party URL and also remove all (http)  - unsecured URLs from your domain

Third: apply this code to your web.config file

<configuration>
<system.webServer>
<rewrite>
    <rules>
   <rule name="HTTP to HTTPS redirect" stopProcessing="true">
   <match url="(.*)" />
   <conditions>
      <add input="{HTTPS}" pattern="off" ignoreCase="true" />
   </conditions>
   <action type="Redirect" redirectType="Permanent" url="https://www.example.com/{R:1}" />
</rule>   
    </rules>
</rewrite>
</system.webServer>
</configuration>

You can simply place the main domain by replacing www.example.com or if your preferred search domains s example.com, then replace it with simply yourdomain.com.

After all, those, upload the web.config file to ftp in public_html folder.

That's it. You are all set to go :)

Good Luck

Co-Founder & Director - MysticDigi, SEO Service in India & Data Entry Adroits
Founder & Director - Search Engine Stream

Offline AmarInfotech

  • Trade Count: (0)
  • Jr. Member
  • **
  • Thank You 3
  • Posts: 59
  • Karma: 0
  • Gender: Male
  • We knows Whats better
    • Web Development Company in INDIA
Re: How to redirect site from http to https?
« Reply #3 on: 08-27-2017, 23:47:30 »
Recently Google has announced in its one of the updates that from Oct 2017, It will give preference to HTTPS sites compared to the HTTP ones. Nowadays, users are also aware of being secure in the world wide web, so they also prefer HTTPS to HTTP sites. Therefore, you need to about how we can move our HTTP site to HTTPS.

The following steps will help you to perform this crucial task.

1. Set up your website for the migration.

2. Purchase an SSL certificate.

3. Configure the hosting with SSL certificate.

4. Change all the website link to HTTPS from HTTP.

5. Setup the 301 redirects from HTTP to HTTPS.

6. Keep the track of your website performance during the migration period.
Amar Infotech is a Laravel development company provides efficient Laravel development services at affordable rates.

Offline mammasseo

  • Trade Count: (0)
  • Semi-Newbie
  • *
  • Thank You 2
  • Posts: 34
  • Karma: 0
    • Mammaa's Kitchen||mammaskitchen|cold pressed oil|sesame oil in india
Re: How to redirect site from http to https?
« Reply #4 on: 08-28-2017, 02:36:26 »
To redirect http URLs to https, do the following:

<VirtualHost *:80>
    ServerName www.example.com
    Redirect / https://www.example.com/
</VirtualHost>

<VirtualHost *:443>
    ServerName www.example.com
    # ... SSL configuration goes here
</VirtualHost>


This snippet should go into main server configuration file, not into .htaccess as asked in the question.

This article might have come up only after the question was asked and answered, but seems to be the current way to go.


Offline mammasseo

  • Trade Count: (0)
  • Semi-Newbie
  • *
  • Thank You 2
  • Posts: 34
  • Karma: 0
    • Mammaa's Kitchen||mammaskitchen|cold pressed oil|sesame oil in india
Re: How to redirect site from http to https?
« Reply #5 on: 08-30-2017, 00:06:26 »
1. Get ready
2. Purchase and SSL Certificate
3. Configure hosting with SSL Certificate
4. Change all website links to HTTPS
5. Setup 301 redirects from HTTP to HTTPS or consider HSTS
6. Conclusion

Offline mammasseo

  • Trade Count: (0)
  • Semi-Newbie
  • *
  • Thank You 2
  • Posts: 34
  • Karma: 0
    • Mammaa's Kitchen||mammaskitchen|cold pressed oil|sesame oil in india
Re: How to redirect site from http to https?
« Reply #6 on: 09-12-2017, 05:06:08 »
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

Offline neelseofast

  • Trade Count: (0)
  • Jr. Member
  • **
  • Thank You 3
  • Posts: 53
  • Karma: 1
    • Online Free recharge
Re: How to redirect site from http to https?
« Reply #7 on: 09-15-2017, 01:12:05 »
Using the following code in your .htaccess file automatically redirects visitors to the HTTPS version of your site:

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

Perfect.! It will work try this.

 

Related Topics

  Subject / Started by Replies Last post
6 Replies
5273 Views
Last post 09-06-2014, 00:40:45
by seoconsult01
5 Replies
3599 Views
Last post 09-19-2014, 03:09:54
by Roy Milson
0 Replies
1663 Views
Last post 04-25-2015, 23:00:10
by immediate
0 Replies
797 Views
Last post 11-22-2016, 04:51:01
by mahisharma2
0 Replies
334 Views
Last post 07-19-2017, 07:24:05
by mariya