Articles in this section

How to add an alias for subdomain in Plesk?

kb: how-to Plesk for Linux

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

Question

Is it possible to add an alias for a subdomain in Plesk for Linux?

For example, the subdomain name is one.example.com and the alias name should be alias.one.example.com or  two.example.org.

Answer

This functionality is yet to be implemented in Plesk, however a feature request for it already exists, so you may vote for it on the following page:

https://features.plesk.com/c/235-subdomain-aliases

The feature requests that receive the most votes may be implemented in future versions of Plesk and its extensions.

In the meantime, you may apply one of the following workarounds:

Add subdomain as domain in Plesk
  1. Log into Plesk
  2. Recreate the subdomain as a "domain" by clicking on Domains > Add domain and naming it one.example.com
  3. Click on Domains > Add Domain Alias and select the domain one.example.com:

    Screen_Shot_2022-03-01_at_13.47.58.png

Use additional directives (Linux only)

Note: If you are a domain owner and Apache/nginx additional directives are hidden, please contact the server administrator or provider for assistance.

  1. Log into Plesk
  2. Add additional directives for the subdomain in Domains > sub.example.com > Apache & nginx Settings:

    • for Additional directives for HTTP and Additional directives for HTTPS:

      CONFIG_TEXT: ServerAlias alias.sub.example.com

    • for Additional nginx directives:

      CONFIG_TEXT: server_name alias.sub.example.com;

Was this article helpful?

Comments

2 comments
Date Votes
  • Workaround 2 did not work! When http the subdomain alias, then the Web Server's Default Page appears. 

    I am suggesting the following workaround:
    1. Create a new subdomain (Alias)
    2. Change Hosting type to forwarding/frame forwarding

    Following e.g: plh.wedeva.com (is Alias) → pli.wedeva.com

    0
  • Workaround 1 not working in 18.0.68. In GUI you can't select a subdomain "for the domain".

    0

Please sign in to leave a comment.