• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Force https/SSL single domain; howto

DocGerry

New Pleskian
Plesk 9.5 on Ubuntu on a VPS. Three domains on the server, one of them has the SSL certificate which is the host name of the VPS server

SSL certificate installed myownsingledomain.com

All traffic to http://myownsingledomain.com and files and subdirectories I want to redirected to https://myownsingledomain.com

The domain is set to use the one directory httpdocs, and https://myownsingledomain.com works...the secured green thing comes up on browsers as authenticated until of course you click on any link and it takes you to back to http

Anyone clicking on http://myownsingledomain.com needs to be directed to https with a Rewrite.

The server seems to ignore .htaccess but there is probably a more elegant solution anyway. Perhaps it is so obvious I do not see anything in FAQ or searching the forum. I have searched around and do not find a Plesk specific solution.

Thanks
 
Put this in .htaccess

RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

And make sure your apache conf file has this in it somewhere
#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#
AccessFileName .htaccess
 
Back
Top