Applicable to:
- Plesk for Linux
- Plesk for Windows
Symptoms
-
The dropdown for selection of a Hosting type for a domain in Domains > example.com > Dashboard > Hosting is not clickable:
-
On attempts to change the type from CLI, the following message is shown:
# 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 created within the affected Subscription:
Cause
By design, it is not possible to change the Hosting Type of the Subscription's main domain if there are additional domains due to internal workings of Plesk and the limits that they come with.
The main reason is tied to the additional domains have the content hosted within the main domain's directory.
If you would like to have such functionality in future versions of Plesk, consider voting for the following feature request:
Resolution
As a workaround, configure the forwarding manually for the domain:
-
For Linux
-
Go to Domains > example.com > Dashboard > Hosting > Disable the Permanent SEO-safe 301 redirect from HTTP to HTTPS option
-
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.
-
For Windows
-
Navigate to Domains > example.com > Dashboard > Files
-
Open
web.config
file 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.html
file with the following content:CONFIG_TEXT: <html><head><title>Title</title></head>
<style>
body {
margin: 0;
padding: 0;
}
body, iframe {
width: 100%;
height: 100%;
}
iframe {
border: 0;
}
</style>
<body>
<iframe src="https://example.net"/>
</body>
</html>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: There is no such a workaround for settings the "No hosting" type.
If the "No hosting" type is needed, as a workaround, move the domain to a separate subscription as the main and only domain there.
Comments
1 comment
It's very necessary to be able to create 'No hosting' type for any domain. This gives the customer access to their DNS records if they only purchase a domain name.
Please sign in to leave a comment.