There are upcoming maintenance events which may impact our services. Learn more

How do I switch my primary domain to another domain in Plesk Print

  • 0

Problem Description

  • You have a hosting plan with multiple domains under the same subscription/webspace in Plesk
  • You wish to change your primary domain to one of the other domains already set up and working well in Plesk

For example, your primary domain is olddomain.com and you have an addon domain within that subscription called newdomain.com. You no longer wish to use olddomain.com and you'd like to replace it with newdomain.com, but unfortunately Plesk doesn't allow you to remove the primary domain: olddomain.com.

Note: if the domain you're changing the primary domain to has not already been added to Plesk and does not already contain the intended website, please follow our guide to changing a domain in Plesk instead - that guide will allow you to skip the first 5 steps below.

Problem Resolution

It's not possible to simply press a button to change your primary domain in Plesk, and so to make this happen we'll need to do a little re-arranging of the hosting plan structure.

Important Mail Hosting Consideration: If your mail is hosted locally and managed within Plesk the steps below will delete all email accounts hosted on the addon domain and make all email accounts hosted on your primary domain change to the addon domain. For example the email account info@olddomain.com will become info@newdomain.com and any emails that were previously located within the info@newdomain.com account will be erased. If you do not have email accounts or if your email is not hosted/managed within Plesk (ex: you use Microsoft365, Websavers Exchange, or Google Workspace) this will not a be a problem.

Tip: if you have a website powered by a web application like WordPress and it does not currently appear in 1-click web apps in Plesk, you must import the web app before proceeding.

How to change your primary domain in Plesk

Let's say Plesk is setup like this:

Primary domain: olddomain.com, which houses the website you no longer need

Addon domain: newdomain.com, where you've built your new website

Complete the following steps:

  1. Backup & Remove: Using 1-click web apps, create a backup of the website at olddomain.com then remove the app (if there's more than one, repeat this for each). If your website isn't in 1-click web apps, remove the files manually using the Plesk File Manager.
  2. Clone the site at newdomain.com to olddomain.com. We realize this step seems counterintuitive; it will make sense at step 4. (Tip: if your website does not use WordPress and does not have a database you can instead use the Plesk File Manager or Plesk's "Website Copying" function to copy all the files over, then make sure the site is working well at olddomain.com.
  3. Remove the domain newdomain.com from Plesk.
  4. Rename olddomain.com to newdomain.com by following this guide: https://websavers.ca/change-domain-name-plesk
  5. Create an alias: If you wish for olddomain.com to redirect to newdomain.com, choose the Add Domain Alias button in Plesk and add olddomain.com as an alias to newdomain.com.

Thanks to our internal automation tools that sync Plesk with 1-click web apps, these steps will automatically update configurations for web apps like WordPress to the new domain. If you encounter any trouble with this process, please create a support ticket and be sure to indicate exactly which step you have encountered difficulty with along with a description of what happened.

Check your addon domains

If you have addon domains in Plesk, we recommend waiting 10 minutes, then checking to be sure each one is working properly. Our automation scripts will automatically update most WordPress configuration files, but not other apps. The reason your addon domains could encounter issues after the change of primary domain is because your primary domain is included in the user root path like this (you don't see this part of the path in Plesk):

/var/www/vhosts/olddomain.com/

Then each site has its web root folder within that, like httpdocs for the primary domain and typically a folder matching the domain name for each addon domain or subdomain. That means each addon domain has a web root that looks like this (one additional folder within): /var/www/vhosts/olddomain.com/myaddondomain.ca

When you change the primary domain, the user root folder changes making the path to the addon domain: /var/www/vhosts/newdomain.com/myaddondomain.ca

If the addon domain has a web app installed that specifies/uses the web root or user root path in any of its configuration, that configuration will need to be updated to the new value. With WordPress, we've automatically handled most of those necessary changes, but other apps and some plugins for WordPress will need to be manually adjusted to the new path.


Was this answer helpful?

← Back