Skip to main content

About Plesk URL or Telling Customers the Right Address to Go to


A long time ago Plesk had one good little feature: when typing the panel address in your browser address bar, if you specified the port (8443), but omitted the encryption method (https), Plesk would redirect you to the address https://<server_hostname>:8443. In version 11.5, we replaced the lighttpd web server that served Plesk with nginx. And broke that good little feature.

Right away, our users pointed out that breaking good little features and giving nothing in return is bad. Please forgive and forget 🙂 As you can see in Plesk 12.0 preview (available through autoinstaller with –all-versions key), we returned the previous behavior.

What’s our point in telling this story? We wanted to share one interesting use-case proposed by our users and to contribute to it.

So, let’s assume that your server hostname is and you installed a valid SSL certificate to protect Plesk. Now you tell your customer: “To enter the hosting control panel, add :8443 to your domain name. For example,” After that, the customer is automagically redirected from to and kept out of a terrible error informing them about an SSL certificate issued to a domain other than theirs, an attempt to steal their data and other horror stories that browsers tell. The customer sees the green address bar in their browser and does not see any errors – the provider’s credibility grows.

How it works and what else can be done with it

The magic is hidden in the /etc/sw-cp-server/config configuration file, namely in the following string:

In case a plain HTTP request was sent to an HTTPS port, this string makes the web server (works only for nginx) redirect the user to the “correct” address. The correct address consists of the correct https protocol, the server hostname, port number and the remaining part of the “incorrect” request.

As many of you have already guessed it right, we can replace the $hostname variable with a definite address. Thus, we get rid of strict binding to the server hostname. Still, editing the configuration file is a very bad idea. Most likely, further Plesk updates will not install correctly, because the configuration file was changed. That’s why we are going to create a new file, where we simply redefine this instruction. We will create a /etc/sw-cp-server/conf.d/ file with the following content:

Then restart sw-cp-server

Thus, all users will be directed to regardless of the server hostname.

Cherry on Top

For those who do not like working with console or editing configuration files, we developed an extension that does this work for you. It will be especially useful for those who actively use Custom View and do not have an access to the server. The only limitation of this extension is that the settings are not applied automatically. You will have to restart the sw-cp-server service or the whole server.


5 thoughts

  1. Sebastian Beßler -

    I have found an error in the article.

    Instead of
    has to be created.

    The extension does the right thing


    Sergey Ugdyzhekov -

    Hello Sebastian,

    Thank you for your comment. Mistake was fixed 🙂


  2. Bart -

    Is there also a way to do this in a Plesk 12 Windows version?

    Many thanks,


  3. Alexander -

    Link to “Extension – custom-plesk-host” – broken.
    I tried to do this follow instructions on Plesk 12.0.18 #27, but no success.


    Alexei Yuzhakov -

    Thank you for the feedback. The link has been fixed.


Leave a Reply

Your email address will not be published. Required fields are marked *