- Plesk Onyx for Linux
Is it possible to set an SSL certificate for a domain with "Forwarding" Hosting Type?
The functionality is not implemented in Plesk yet. Take part in our product improvement by referring to the following link:
As a workaround it is possible to go through one of the two the following possible ways:
Other website is hosted somewhere else
- Set the Hosting Type of the website to Website-Hosting.
- Remove all the files in the home httpdocs directory
- Create an
index.htmlfile and add the following content:
<FRAME SRC="https://www.example.com/" NORESIZE>
Your browser does not support frames.
Note: This will always redirect to HTTPS, even if the customer is visiting HTTP. Replace https://www.example.com/ with the appropriate URL.
Other website is hosted on the same server
Warning: the actions suggested below are not officially supported by Plesk, however it should work for some extent. Use them on one's own risk.
Create a forwarding domain with the Hosting Type Website Hosting inside subscription of the main domain. For example - main domain - example.com; forwarding domain - example2.com:
Plesk > Subscriptions > example.com > Add Domain
Add Let's Encrypt certificate to example2.com via Plesk > Subscriptions > example.com > example2.com > Let's Encrypt .
Connect to the server via SSH .
Remove the document root of the example2.com:
# rm -r /var/www/vhosts/example.com/example2.com
Create a symbolic link to document root of the main domain example.com:
# ln -s /var/www/vhosts/example.com/httpdocs /var/www/vhosts/example.com/example2.com
Change the ownership of newly created symbolic to match the owner of example.com.
# ls -ld /var/www/vhosts/example.com/httpdocs/
drwxr-x--- 19 jdoe psaserv 4096 Oct 9 22:56 /var/www/vhosts/example.com/httpdocs/
# chown -h jdoe:psaserv /var/www/vhosts/example.com/example2.com