- Plesk for Linux
- Plesk for Windows
Cannot change hosting type of the main domain of subscription: the button Change is not available in Domains > example.com > Hosting Settings > Hosting type:
It is not possible to switch the type from CLI also:
# plesk bin site -u example.com -hst_type std -target_url example.net
Subscription contains sites, therefore, you cannot change hosting type or delete it.
exit status 1
There are additional domains available in the subscription:
# plesk db -Ne 'SELECT count(*) FROM domains d1 LEFT JOIN domains d2 ON d1.id = d2.webspace_id WHERE d1.name = "example.com";'
It is not possible to change the hosting type of the subscription's main domain due to the internal limitations, as the additional domains have the content hosted within the main subscription's domain.
Consider voting for the corresponding feature request.
As a workaround, configure the forwarding type manually on the domain:
Disable the Permanent SEO-safe 301 redirect from HTTP to HTTPS option in the Domains > example.com > Hosting Settings
Navigate to Domains > example.com > Apache & nginx Settings
Add the following directives to both Additional directives for HTTP and Additional directives for HTTPS:
CONFIG_TEXT: Redirect 301 / https://example.net/
Note: Replace the https://example.net/ with the desired target location. In case 302 redirect is required, change 301 to 302.
Add the following directives to 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.
Navigate to Domains > example.com > File Manager
web.configfile and 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.
Navigate to Domains > example.com > File Manager and create an
index.htmlfile with the following content:
<frameset rows="100%, *" frameborder=no framespacing=0 border=0>
<iframe src="http://example.net/" name=mainwindow frameborder=no framespacing=0 marginheight=0 marginwidth=0></iframe>
This page uses frames, but your browser doesn't support them. Sorry!
Note: Replace the http://example.net/ with the desired target location. The target domain must allow iframes: Domain that has frame forwarding hosting type shows blank page
Set the index.html as the main index document: How to set default index file for a domain in Plesk Onyx
Note: It will not be possible to set the "No hosting" type that way