Plesk

Why there is no redirect from http to https to access Plesk login page?

Question

Why there is no redirect from HTTP to HTTPS on access to the Plesk via customized URL (i.e. http://example.com)?

Note: The domain example.com does not exist but set in Plesk > Tools & Settings > Customize Plesk URL.

Answer

This is default Plesk behavior. There is no redirect from HTTP to HTTPS for the domain specified in Customize Plesk URL.

Vote the following feature request from our Official Plesk UserVoice channel as top-voted suggestions are likely to be included in future Plesk versions.

As a workaround:

Plesk GUI

Create the corresponding subscription in Plesk:

  1. Log in to Plesk GUI

  2. Create a new subscription in Subscriptions > Add Subscription with the name example.com

  3. Go to Subscriptions > example.com > Hosting settings

  4. Tick the options SSL/TLS support and Permanent SEO-safe 301 redirect from HTTP to HTTPS

  5. Click the OK button

Via SSH (Plesk for Linux Only)

  1. Connect to the server via SSH

  2. Create the file /var/www/vhosts/default/htdocs/.htaccess with the following content:

    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
    Header always set Content-Security-Policy "upgrade-insecure-requests;"