- Plesk Onyx for Linux
- Plesk Onyx for Windows
How to allow HTTPS and configure an SSL certificate on a domain in Plesk which has Hosting type set as Forwarding?
Accessing forwarding website directly via HTTPS, e.g. by clicking the link in Google search results, leads to the certificate warning.
Forwarding from HTTPS website is not yet implemented in Plesk. Vote for the related feature request at Plesk User Voice. Top-voted requests are considered for implementing in Plesk.
As a workaround, configure the forwarding type manually on a domain with Website hosting and set up the certificate:
Change the Hosting type of the domain to Website hosting in Domains > example.com > Web Hosting Access.
Go to Domains > example.com > Apache & nginx Settings.
Add the following directives to both fields Additional directives for HTTP and Additional directives for HTTPS:
CONFIG_TEXT: Redirect 301 / https://example.net/
Note: Replace https://example.net/ with the desired target location. In case 302 redirect is required, change 301 to 302.
Add the following directives to the field Additional nginx directives, if it is present:
CONFIG_TEXT: return 301 $scheme://example.net$request_uri;
Note: The directives above can only be modified by Plesk Administrator. In case they are absent, contact service provider and ask to apply this article.
Go to Domains > example.com > File Manager.
Open the file
web.configand add the following content right below the <system.webServer> declaration:
CONFIG_TEXT: <httpRedirect enabled="true" destination="https://example.net/" httpResponseStatus="Permanent" />
Note: Replace the https://example.net/ with the desired target location. In case 302 redirect is required, change Permanent status to Found.