• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

How to redirect automaticly to https?

R

RobertS

Guest
How can I set if someone visits http://www.domainname.com Plesk automaticly loads httpS://www.domainname.com?

I have a customer which want to use https always but the visitors of his website do not know what httpS is, so they always enter the site by http instead of httpS

The domain runs on a exclusief IP and has its own certificate installed.
When I go to webdirectories -> preferences and enable require SSL it gives not the correct effect, now visitors get an page not found if they visit hte site using normal http

The site (webshop) works perfectly if visitors enter manually https instead of http, but the shop has no option to redirect to https when you which to check out and pay. I therefore which that all visitors of this domain are automaticly redirected to https.

How do i do that in Plesk 8.2?
 
Hi,

You can force redirection to ssl by enabling Require SSL at the following page:

Plesk -> domains -> domainname -> Web directories -> preferences
 
As it says in his original post, those are the steps that he tried and it's returning an 403 error when you type in plain http://domain.com

You can use the following simple PHP code to perform a redirection to https, if you have a PHP based site. Actually, you can use this PHP code as a base to make the redirection work regardless of the script engine you use.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>

<?php

$https_url = "https://domain.com";

if ($_SERVER["HTTPS"] == "Off")

print '<meta http-equiv="Refresh" content="0; URL='.$https_url.'">'

?>


<!-- here goes your content>

</head>
<body>

</body>
</html>
 
Also redirection can be used as workaround, I think you also need to set that domain as defail on Ip.
Plesk CP -Server-IP management- ip - address line - hosts column select host check set as default.

John S.G.
 
Back
Top