How to redirect site from http to https?

Started by AdityaM7, 08-08-2017, 01:58:57

Previous topic - Next topic

AdityaM7Topic starter

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.
  •  


Sojan Babu

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]



seoanubhavgarg

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
  •  

AmarInfotech

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.
  •  

mammasseo

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.


mammasseo

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

mammasseo

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

neelseofast

Quote from: Sojan Babu 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]

Perfect.! It will work try this.


impressicodigital

There is another way, page rules.
Go to Page Rules.
Click "Create Page Rule"
Enter the URL (put the asterisk, so redirection happens for all the URI)
Click "Add a Setting" and select "Always Use HTTPS" from the drop-down.
Impressico Digital is one of the leading Digital Marketing agencies offering SEO, PPC, SMO, ORM, ASO and design &amp; development services at best prices. Call @ 0120 419 0000
  •  


soleseriouss

Tried the above solutions?
Does any of it work for you?
Best Online Sneaker Store | Air Jordan Sneakers for Men
100% Authentic & New Sneakers | FREE Shipping*
  •