See Our Webmaster Tools for Windows and Mac

                                  

How to redirect site from http to https?

Started by swatijain22, May 14, 2019, 07:17:58 AM

swatijain22

Hello friends,


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

goyums

You can use .htaccess file and place this code snippets into it (with Linux Hosting & Cpanel/DirectAdmin):

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

or using this code (with specify domain name)

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^(.*)$ https://ohiwill.com/$1 [R,L]

HostechSupport


goyums

 DO REPLACE EXAMPLE.COM WITH YOUR OWN SITE NAME
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

Betasolutionscpa

Redirecting your website from HTTP to HTTPS is crucial for security and user trust. It ensures that all information sent between your server and the browsers of your visitors is encrypted. Your web server software determines the approach you choose.

Before you start:
  • Install an SSL certificate
  • Backup your configuration files

Apache (.htaccess file)
This is the most common method for shared hosting environments.

  • Locate your .htaccess file
  • Edit the .htaccess file
  • Save and test





recommended related video to How to redirect site from http to https
Note: Check our video related to keywords in "How to redirect site from http to https" on YouTube.