How to Redirect website from http to https for a domain in Plesk 12.5

How do I force all visitors of my website to use secure connection (HTTPS)?

migrate-from-http-to-https[1]

 

 

 

 

 

 

 

 

 

Linux:

  1. Make sure that mod_rewrite Apache module is enabled:
    # httpd -t -D DUMP_MODULES | grep rewrite Syntax OK rewrite_module (shared)

2.Create file .htaccess in document root of the domain and put following configuration inside:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,QSA]
</IfModule>

or

Go to Plesk > Domains > example.com > Websites & Domains > Web Server Settings and add above configuration toAdditional directives for HTTP. and https. The only thing we’re interested right now is simply redirecting all traffic from http to https. For this, we’ll simply add a rewrite rule to the http directive:

 

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,QSA]
</IfModule>
you can see below picture 

Plesk 12.5

 

 

 

 

 

 

 

 

 

Click on Apply button and all your http request will be automatically rewritten to use https.

 


 

 

Like
Like Love Haha Wow Sad Angry