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
- URL links
- FTP configuration
- Email configuration
- Mailing lists
- SSL certificates
- Private nameservers
- WHMCS licensing
- cPanel password
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 |
whctest.ca (your old primary domain) |
/home/username/public_html |
(The domain is removed from the cPanel account) |
whctest2.ca (your new primary domain) |
/home/username/whctest2.ca |
/home/username/public_html |
Note: The directory structure of alias or addon domains will remain unchanged.
To check the current status of your domain directories:
- Log in to cPanel
- Under the Domains section, click Domains
Troubleshooting
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.
URL Links
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.
Troubleshooting
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.
My WordPress website is redirecting to my previous domain
Ensure that your WordPress site URL matches your new primary domain. To check this:
- Log in to your WordPress Dashboard
- Select Settings, then General
- Update WordPress Address (URL) and Site Address (URL) with your new primary domain address
- 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 |
Drupal |
/sites/default/settings.php |
Joomla |
/configuration.php |
Magento 1.x |
/app/etc/local.xml |
Magento 2.x |
/app/etc/env.php |
myBB |
/inc/config.php |
OpenCart |
/admin/config.php and /config.php |
phpBB |
/config.php |
PrestaShop |
/config/settings.inc.php |
WHMCS |
/configuration.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 |
whctest.ca (your old primary domain) |
Username: ftp1@whctest.ca Path: /home/username/whctest.ca |
Username: ftp1@whctest2.ca Path: /home/username/whctest.ca |
whctest2.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.
Troubleshooting
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:
- Log in to cPanel
- Under the Files section, click FTP Accounts
- 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
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 |
whctest.ca (your old primary domain) |
mailbox1@whctest.ca |
(your mailbox will be removed during the change & its content will remain in your server directory /home/username/mail/whctest.ca/mailbox1 ) |
whctest2.ca (your new primary domain) |
mailbox2@whctest2.ca |
mailbox2@whctest2.ca (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.
Troubleshooting
My email accounts are missing
Check the status of your mailboxes as follows:
- Log in to cPanel
- 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.
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 |
whctest.ca (your old primary domain) |
mailinglist1@whctest.ca |
mailinglist1@whctest2.ca |
whctest2.ca (your new primary domain) |
mailinglist2@whctest2.ca |
mailinglist2@whctest2.ca (your mailing list is re-created automatically) |
Troubleshooting
My mailing lists from my previous domain are not working
Re-instate your previously created mailing list as follows:
- Log in to cPanel
- 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.
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.
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.
Troubleshooting
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
Troubleshooting
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).