Articles in this section

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

kb: how-to Plesk Obsidian for Linux Plesk Obsidian for Windows ABT: Group A

Applicable to:

  • Plesk Obsidian for Linux
  • Plesk Obsidian for Windows

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.

Submit a feature request 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:

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

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.