Customer Support

  1. Support
  2. Other questions about Plesk
  3. How can I change the primary domain to one that already exists in Plesk?

How can I change the primary domain to one that already exists in Plesk?

If you wish to change the primary domain of your package, this action requires special attention. Changing the primary domain alters the absolute path on the server, which may cause issues if your pages use this path in their application code.

See here what you need to consider when changing your package's primary domain.

Generally, changing the primary site name is not recommended. However, if renaming is necessary and you want to replace the primary domain with one already in the package, follow the instructions below, paying special attention to technical issues that may arise:

  • Example: The primary domain is domain1.tld. The additional domain already in Plesk is domain2.tld. We will change the primary domain from domain1.tld to domain2.tld.

Steps to rename the primary domain to one already in Plesk:

  1. Delete the existing domain domain2.tld from Plesk. (This affects emails, subdomains, SSL configuration, databases, etc.)

    a) Log in to the myTophost Panel and select Plesk Login to access the relevant Plesk package.

b) Locate the domain already in your Plesk (domain2.tld) that you want to rename as the primary domain (domain1.tld). Select Remove Website.

  1. Rename the primary domain domain1.tld to domain2.tld, following the instructions in this Knowledge Base article.

a) Locate domain1.tld in Plesk and select Hosting Settings.

b) In the Domain name field, enter the new primary domain name domain2.tld and click OK.

  1. Re-upload the domain2.tld files and recreate all services removed during deletion.

a) Transfer the files to the correct folders via FTP or Plesk file manager.

b) Recreate subdomains, domain aliases, and email accounts through Plesk by following these instructions:

  1. Verify that everything works correctly.

As mentioned, changing the primary domain changes the server's absolute path. Ensure that all additional domains using CMS applications (e.g., WordPress, Joomla) are updated with the new absolute path. This task should be handled by your website developer.

For example:

If the primary domain is domain1.tld:

  • Initial primary domain absolute path: /var/www/vhosts/domain1.tld/httpdocs
  • Initial additional domain absolute path: /var/www/vhosts/domain1.tld/addon-domain.tld

If the primary domain changes to domain2.tld:

  • New primary domain absolute path: /var/www/vhosts/domain2.tld/httpdocs
  • New additional domain absolute path: /var/www/vhosts/domain2.tld/addon-domain.tld

You haven't found what you are looking for?

Contact our experts, they will be happy to help!

Contact us