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:
Create the corresponding subscription in Plesk:
- Log in to Plesk GUI
- Create a new subscription in Subscriptions > Add Subscription with the name example.com
- Go to Subscriptions > example.com > Hosting settings
- Tick the options SSL/TLS support and Permanent SEO-safe 301 redirect from HTTP to HTTPS
- Click the OK button
- Connect to the server via SSH
-
Create the file
/var/www/vhosts/default/htdocs/.htaccesswith 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;"
Comments
Please sign in to leave a comment.