Articles in this section

Cannot change the Hosting type of a domain: The dropdown for selection is not clickable

Plesk for Windows Plesk for Linux kb: technical

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, which normally 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:

Allow domain forwarding for every domain in a subscription, including the subscription domain – Your Ideas for Plesk

Resolution

As a workaround, configure the forwarding manually for the domain:

Forwarding with 301/302 code
  • For Linux

    1. Log into Plesk

    2. Go to Domains > example.com > Dashboard > Hosting > Disable the Permanent SEO-safe 301 redirect from HTTP to HTTPS option

    3. Navigate to Domains > example.com > Apache & nginx Settings

    4. Add the following directives to both Additional directives for HTTP and Additional directives for HTTPS:

      CONFIG_TEXT: RewriteEngine On
      RewriteCond %{REQUEST_URI} !^/$
      RewriteRule ^(.*)/$ https://example.net/$1 [R=301,L]

      Note: Replace the https://example.net/ with the desired target location. In case 302 redirect is required, change 301 to 302.

    5. Add the following directives to Additional nginx directives, if it is present:

      CONFIG_TEXT: return 301 $scheme://example.net;

      Note: The directives above can only be modified by Plesk Administrator. In case they are absent, contact your service provider and ask to apply this article.

  • For Windows

    1. Log into Plesk

    2. Navigate to Domains > example.com > Dashboard > Files

    3. 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.

Frame forwarding
  1. Log into Plesk

  2. 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

  3. 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 workaround for 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.

Was this article helpful?

Comments

1 comment
Date Votes
  • 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.

    0

Please sign in to leave a comment.