How to Change the Primary Domain in cPanel If you use alternate means to back up your accounts, ensure you have available backups before making this change. These will be available if you already have backups configured within WHM. Always ensure that you have available backups for the domain within the backup restoration area in WHM.
Here is information on Creating a full website backup via cPanel for the account you want to modify. Backupsīefore making any significant changes on your server, it’s advised to have the ability to revert in case of mistakes. Changing the primary domain is done via WHM which requires root level access. While most changes are made within the cPanel account for the user, this change cannot be made within the cPanel account for the domain. Changing the primary domain will only change data related to the cPanel account and its associated user. However, for clarity, this does not change the hostname of the server (your server name) and does not change the name of the server within your account either. Often changing the primary domain is confused with the hostname of the server, these are separate changes. If you have purchased an SSL, you will need to order a new SSL for the new domain name.Ĭhanging the primary domain may require modifying the siteurl if you are using WordPress, and this could break the installation until you change the URL. If you are using AutoSSL, you may need to re-run to ensure all sites have an SSL installed appropriately. If you have an SSL certificate applied to this account, you will end up revoking the SSL installed for the current primary domain by removing it. Locate the alias you want to be removed and click remove. Navigate to and click on ‘Aliases’ (this may be listed as parked domains on older versions of WHM) (or you could locate subdomains or addon domains) The following can be used as a basic guide to remove these as the process for each is the same: You will also want to remove any subdomains of your primary domain name before you can change it as well. Meaning you may need to save the content and site data for addon domains elsewhere on the server until after this change. If you already added an alias (a parked domain which shares content) or addon domain (which has its content apart from the main domain), you need to remove it first.
If using custom nameservers be sure to go into the DNS editor and take a screenshot of your DNS for the domain or copy the records to a text document before making this change.Īn additional effect is that all email accounts change to reflect the new domain, for example changing the primary domain from to will change to You may then need to update the e-mail address and username (for both incoming and outgoing servers within your e-mail client) on any devices that e-mail account is set up on. Making this change will delete any custom DNS records if you are using custom nameserver setup within WHM and hosting your DNS. Making the change will modify multiple factors of the domain including (if you so choose) the cPanel username (which is usually not advised), the FTP username, and MySQL users.
However, it does make some potentially significant changes on the account that could create the need for additional changes for site functionality, so it is best to understand what these changes are before making the decision to change the main domain in cPanel. Whatever the reason for changing the primary domain, the change is relatively simple to make.
Sometimes the wrong site name was set to be the primary domain, to begin with (we all make mistakes, right?). It can also occur when a domain is no longer used, or when the domain is removed from an account. You may desire to change this if the name of your company or site changes. Wanting to change the primary domain in cPanel is desirable for multiple reasons and many times occurs when the site in use switches from one TLD to another (i.e. If you use multiple aliases ( previously called parked domains) within a cPanel account, you may find yourself wanting to change the main domain used for the cPanel account containing these domains.