• Portal Home
  • Knowledgebase
  • Domain Names and DNS
  • What to check after your primary domain is changed in cPanel

What to check after your primary domain is changed in cPanel

If you change the primary domain associated with your hosting account, there are several things to consider, based on your hosting plan. In this article, we’ll review what you should look out for after making this change.


Domain directory content

By default, the cPanel primary domain name is its document root (i.e. /public_html). The document root is the folder on the server which stores your website files. 

So when your accounts’ primary domain is changed, the document root for your new primary domain will change to the /public_html folder. For example:


BEFORE the change

AFTER the change


(your old primary domain)


(The domain is removed from the cPanel account)


(your new primary domain)



Note: The directory structure of alias or addon domains will remain unchanged.

To check the current status of your domain directories:

    1. Log in to cPanel
    2. Under the Domains section, click Domains

Domain example


My new primary domain directs to a parked page

If your domain is redirecting to a parked page instead of your website, check that it’s pointed to the correct hosting server. See: How to update the DNS Records (A, AAAA, CNAME, MX, TXT, SRV) for my domain.

You may also add a Type A DNS record, using your server IP address as the value.

My new primary domain directs to my previous domain

The website files from your new primary domain (e.g. /home/username/whctest2.ca) are not automatically moved to the /home/username/public_html directory on the server. 

You’ll need to ensure these files are manually moved (or copied) to the correct directory. Refer to How to use the File Manager or How to use (S)FTP, to see how to manage your files.

My previous primary domain shows an error message or does not display content

During this change, your old primary domain will be disconnected from your hosting account. If you wish to keep it within your cPanel account, it can be reinstated as an Addon or Alias domain.

When the primary domain is changed on your hosting account, some of your existing links may be affected. Internal settings, configuration, and database entries linked to your original domain URL will not change to your new primary domain URL automatically. You’ll need to update these manually.


My new primary domain redirects to my previous domain

A redirect may be present in your new /home/username/public_html/.htaccess file. See: How to Use or Modify the htaccess configuration file to learn how to edit this file. You’ll need to locate and remove the redundant redirect setup.

Please use caution when editing your .HTACCESS file, as incorrect configuration can render your website inaccessible. If you are unsure, please reach out to our support team for assistance.

My WordPress website is redirecting to my previous domain

Ensure that your WordPress site URL matches your new primary domain. To check this:

  1. Log in to your WordPress Dashboard
  2. Select Settings, then General
  3. Update WordPress Address (URL) and Site Address (URL) with your new primary domain address
  4. Save your changes

A more complete tutorial for changing your WordPress domain is available here: Changing the Site URL.

My website uses a CMS other than WordPress and is redirecting to my previous primary domain

Use your CMS interface to change the URL setting to match your new primary domain name. Alternatively, locate your configuration files and change to the new database connection. The location of your configuration files will depend on your CMS; see below for a list of common CMS platforms and their config file locations:

CMS Platform

Default configuration file location





Magento 1.x


Magento 2.x





/admin/config.php and /config.php







FTP configuration

When your primary domain is changed, your associated FTP accounts will be preserved with some changes. FTP accounts connected to your old primary domain will be reassigned with usernames for your new domain; however, their paths cannot be changed. For example:


FTP configuration BEFORE the change

FTP configuration AFTER the change


(your old primary domain)

Username: ftp1@whctest.ca

Path: /home/username/whctest.ca

Username: ftp1@whctest2.ca

Path: /home/username/whctest.ca


(your new primary domain)

Username: ftp2@whctest2.ca

Path: /home/username/whctest2.ca

Username: ftp2@whctest2.ca

Path: /home/username/whctest2.ca

Note: The FTP accounts of other hosted domains (alias’ and addons) will not be affected.


My previous FTP accounts do not work or connect to an incorrect directory

You can check the current status of your FTP account setup as follows:

    1. Log in to cPanel
    2. Under the Files section, click FTP Accounts
    3. Scroll down to see your existing accounts; notice that the (FTP Login) names may have changed after the primary domain is changed in your cPanel account

Domain example

Email configuration

Any mailboxes from your old domain will be removed from the list under Email Accounts in cPanel. However, their content will remain accessible in your directory under the original location, for example:


Mailbox BEFORE the change

Mailbox AFTER the change


(your old primary domain)


(your mailbox will be removed during the change &

its content will remain in your server directory /home/username/mail/whctest.ca/mailbox1 )


(your new primary domain)



(your mailbox is re-created automatically)

Note: If the new domain was present in your cPanel account before the primary domain name was changed, its mailboxes will remain and retain their functionality after the change.


My email accounts are missing

Check the status of your mailboxes as follows:

  1. Log in to cPanel
  2. Under the Email section, click Email Accounts

Here you can re-create any mailboxes that are missing. If the content itself is missing from your mailbox/es, you can restore it from a backup if you have one available. See How to Restore Email Backups using JetBackup

The JetBackup Restoration tool is available by default with Web Hosting and Reseller Hosting plans. If you are using other services, this tool may not be available to you. Contact our support team for additional information.

My contact lists are missing

The contacts from the address book of your old primary domain cannot be assigned to the new domain during this change. Ensure that you export any required contact lists before changing the primary domain, then you may import them yourself after the change completes.

Mailing lists

If you have any mailing lists configured on your old primary domain, they’ll automatically re-assign to the new domain during this change. In the case where your new primary domain was already added to your cPanel account with its own mailing lists, they will be retained. For example:


Mailing list BEFORE the change

Mailing list AFTER the change


(your old primary domain)




(your new primary domain)



(your mailing list is re-created automatically)


My mailing lists from my previous domain are not working

Re-instate your previously created mailing list as follows:

  1. Log in to cPanel
  2. Under the Email section, click Mailing Lists

SSL certificates

If you have an SSL certificate installed on your current primary domain, it won’t automatically transfer to your new domain name. If the SSL certificate was ordered with WHC, it can be re-issued by contacting our Support team.

You can check the current status of your SSL certificate by using a tool such as Why No Padlock? 

Private nameservers

If you have a Reseller Hosting plan and use private nameservers for your current primary domain (e.g. ns1.yourdomain.com and ns2.yourdomain.com), your private nameservers cannot be transferred to the new domain. You’ll need to register the new private nameservers and repoint your resold domains to the new nameservers.

Domain names pointed to, for example, ns1.whctest.ca and ns2.whctest.ca, will need to be re-pointed to, for example, ns1.whctest2.ca and ns2.whctest2.ca, after these changes.

WHMCS licensing

If you have a Reseller Hosting plan and have WHMCS software installed on your current primary domain, you’ll need to update the software licensing with your new domain information. 


My WHMCS software displays a “Your license key is invalid” warning

If your WHMCS license was ordered with WHC, please contact our support team who will be able to reissue your license. 

cPanel password


I can’t access the cPanel interface

Check your inbox for an email containing your cPanel login credentials (Note that it may sometimes appear in your Spam folder). If you can’t find this information, contact our support team who will be happy to provide you with the required credentials. 

The cPanel URL doesn’t work

If you’re unable to access cPanel via the URL (e.g. whctest.ca/cpanel), you may gain access to cPanel through your Client Area (see How to access cPanel for detailed instructions).

Was this answer helpful?