How to Change the Primary Domain on a cPanel Account in WHM (Reseller Guide)
As a reseller with WHM access, you can change the primary domain on a cPanel account without needing to recreate the account or move website files manually.
This is useful for:
-
Rebranding a website
-
Correcting a domain name
-
Moving a website to a new domain
-
Replacing a temporary or development domain
Before You Begin
Before changing the primary domain, make sure:
-
The new domain is registered and active
-
The new domain is pointed to the server
-
You have access to the reseller WHM account that owns the cPanel account
-
You have a backup of the website and email data
Important Notes
-
The cPanel username will remain the same
-
Website files and databases are not deleted
-
Email accounts associated with the old domain will remain, but may need to be recreated or updated depending on how they are used
-
Applications such as WordPress may still reference the old domain internally
Step 1: Log Into WHM
Log into your reseller WHM account.
Typically this is done at:
https://any-hosted-domain.com/whm
Step 2: Open “Modify an Account”
In the WHM search bar, search for:
Modify an Account
Then click:
Account Functions → Modify an Account
Step 3: Select the cPanel Account
Locate the cPanel account you want to modify.
Click the Modify button next to the account.
Step 4: Change the Primary Domain
Find the Primary Domain field.
Replace the existing domain with the new domain name.
Example:
| Old Domain | New Domain |
|---|---|
old-domain.com |
new-domain.com |
Once updated, scroll to the bottom and click Save.
WHM will automatically update the account configuration.
Step 5: Verify the Website
After the change is complete:
-
Visit the new domain in a browser
-
Confirm the website loads correctly
-
Verify images, CSS, and links are functioning properly
If the website uses WordPress or another CMS, additional updates may be needed. You may also need to wait for DNS propagation to complete before the new domain works.
Step 6: Update Application Settings (If Needed)
Some applications store the domain name internally.
WordPress Example
If the site uses WordPress:
-
Log into WordPress admin
-
Go to:
Settings → General
-
Update:
-
WordPress Address (URL)
-
Site Address (URL)
-
to the new domain.
You may also need to clear any caching plugins or CDN caches afterward.
If you are unable to access the WordPress admin after the changes you will need to modify the database manually or use terminal and WP-CLI to make the change.
WP-CLI command: wp search-replace 'https://domain.com' 'https://newdomain.com'
Step 7: Reissue SSL Certificates
Once DNS for the new domain is pointed to the server, AutoSSL should automatically issue a new SSL certificate.
You can also manually run AutoSSL from cPanel
Common Issues After Changing the Primary Domain
Website Redirects to the Old Domain
This usually means the application configuration still references the old domain.
Common causes:
-
WordPress site URL settings
-
Hardcoded redirects in
.htaccess -
CMS configuration files
-
Cached redirects
SSL Warning on the New Domain
This usually occurs because the SSL certificate has not yet been reissued for the new domain.
Make sure:
-
DNS is correctly pointed to the server
-
AutoSSL has completed successfully
Email Problems
Email accounts tied to the old domain may no longer match the new branding/domain structure.
You may need to:
-
Create new email accounts using the new domain
-
Update mail clients/devices
-
Recreate forwarders or mailing lists
Final Notes
Changing the primary domain in WHM does not move or delete website files. The account structure remains the same, but the account will now respond using the new domain as its primary website domain.
Always verify:
-
DNS
-
Website functionality
-
SSL
-
Email
-
Application settings
after making the change.