How To Change Primary Domain Of cPanel In WHM Server?
cPanel provides the ability to change the primary domain through Account Management Panel. Before you change primary domain of cPanel in WHM, you should know what gets affected.
What Does and Does Not Automatically Change
Before we proceed with instructions on, how to change primary domain of cPanel, you must understand what does and does not change automatically. The subsequent items are affected when you change your primary domain: email, website files, subdomains, and search engine rank.
- Previous Domain Name: The old primary domain name on the account will be removed. If you still require the old primary domain name, you have to add it as a parked or addon domain name. Once the domain name is changed, you have to log into the cPanel via the new domain if it is already pointing to it.
Example: https://domainB.com/cpanel instead of https://domainA.com/cpanel. - Subdomains: All of your subdomain.domainA.com will turn into subdomain.domainB.com.
For example, test.domainA.com will now be test.domainB.com. - Search Engine Rank: If you are changing your website’s domain name, then this could affect your rank in search engines. You need to set up a 301 redirect, especially when keeping the old domain, which lets search engines know the website is permanently moving.
- Email: All the email accounts created for domainA.com will turn into domainB.com accounts. [email protected] will now be [email protected]. If you still need [email protected], then you need to add domainA.com to your cPanel again as either a parked or addon domain name and recreate the email account.
Important: Before you change the primary domain of cPanel, your old primary domain’s site files will be in the same place as the new primary domain’s site files will go. If you want to create a new site, you must move or remove those old files.
Steps to change the primary domain of cPanel account in WHM.
- Login to WHM Panel as the root user.
- Navigate to the List Accounts option under the Account Information section. You can also find the List Account option from the left-hand search bar.
- Click on the + icon of the user to whom you want to change the primary domain.
- Click on the Modify Account button.
- It will redirect you to a new page where you can modify the account details of that particular user. Under the Basic Information field, there is a field called Primary Domain. You can change your primary domain here.
- Once you change your primary domain, scroll down the page and click the Save button.
That’s it! The Primary Domain of cPanel is changed successfully.
Note: Once you change your primary domain, your username may get updated.