In short
Changing the primary domain in cPanel usually requires the hosting provider or a WHM administrator because the cPanel user interface cannot change the Main Domain. Back up the account first, then update the account domain, website URLs, DNS, SSL, email addresses and old-domain redirects, testing each service before declaring the change complete.
Key takeaways
- A standard cPanel user cannot directly change the Main Domain; the hosting provider or an authorised WHM administrator normally performs the edit. (docs.cpanel.net)
- The proposed new primary domain must not already exist as a primary, addon or alias domain on the server. (support.cpanel.net)
- Changing the primary domain updates affected email, FTP and Web Disk usernames, but website and application references must be corrected separately. (support.cpanel.net)
- The primary domain typically serves files from
public_html, so changing the account domain does not automatically move an addon domain's website into the correct folder. (docs.cpanel.net) - Keep the old domain registered until its website redirects, email transition and HTTPS certificate have been tested.
Table of contents
- Can you change the main domain in cPanel yourself?
- What should you do before changing the primary domain?
- How do you change the primary domain without losing the website?
- What must be fixed after the cPanel main domain changes?
- How do you keep email working on both domains?
- How should the old domain redirect to the new one?
- How do you test the change and know when to roll back?
- What else do cPanel users ask about domain changes?
- Need help making the domain change safely?
A primary-domain change is an account configuration change, not a complete website migration. Treat the website, DNS, certificate and mail system as separate dependencies that happen to share the same domain name.
Can you change the main domain in cPanel yourself?
Usually, no. The normal cPanel user interface lets an account owner manage additional domains, but it does not provide a control for replacing the account's Main Domain.
cPanel's July 2026 Domains documentation states that the hosting provider can change the Main Domain through WHM's Modify an Account interface. A server owner with root WHM access can perform the same action, while shared-hosting customers normally submit the old domain, new domain and affected account to their provider. (docs.cpanel.net)
Do not confuse the Domains interface's Rename Domain option with changing the cPanel account's primary domain. Rename Domain applies to a manageable additional domain; the Main Domain remains controlled at the provider or WHM level.
The account owner prepares and verifies the change; the host or WHM administrator performs the primary-domain edit.
Performance you can feel, backed by clients who depend on it. Read how our support and uptime create long‑term customer success.Power Your Business with Better Hosting
What should you do before changing the primary domain?
Prepare a rollback package before anyone edits the account. Record the current website, mail and DNS configuration so each service can be restored or compared after the change.
Build a rollback pack before anyone changes the account

Generate and download a full account backup using cPanel's Backup or Backup Wizard interface. The cPanel backup documentation warns that a full account backup cannot be restored automatically from the ordinary cPanel interface; automatic restoration requires WHM or help from the hosting provider. (docs.cpanel.net)
The rollback pack should contain:
- A completed cPanel account backup stored away from the hosting account.
- A separate database export for a database-driven website.
- The current document roots for the primary domain and every addon domain.
- Copies of
.htaccess, application configuration files and scheduled-task commands. - An export or screenshot of authoritative A, AAAA, CNAME, MX and TXT records.
- A list of mailboxes, aliases, forwarders, autoresponders and mailing lists.
- A list of payment callbacks, form recipients, APIs, licence records and third-party logins that contain the old domain.
For WordPress, record the current WordPress Address and Site Address and take a database backup. WordPress stores URLs in several places, so changing only the browser-visible address is not a complete domain update.
Confirm that the new domain is clear on the server
The official cPanel domain-change guidance says the new primary domain must not already exist on the server. Check whether it is currently attached to this account or another account as a primary domain, addon domain or alias. (support.cpanel.net)
If the new domain is an addon domain on the same account, record its document root before removing the domain entry. cPanel's domain-removal documentation says removing an additional domain deletes its virtual-host and DNS entries but retains the directory and its contents. Do not delete that retained directory. (docs.cpanel.net)
A usable backup and a written inventory turn a failed cutover into a reversible change.
How do you change the primary domain without losing the website?
Ask the host to change only the Primary Domain field unless there is a separate, documented reason to rename the cPanel username. After the edit, confirm that the intended website files are in the primary domain's document root, which is typically public_html.
Ask the host to change only the Primary Domain field
A root user or authorised administrator follows this WHM sequence:
- Open WHM > Account Functions > Modify an Account.
- Select the affected cPanel account and choose Modify.
- Replace the value in Primary Domain with the registered new domain.
- Leave the cPanel username unchanged unless a separate migration plan requires a rename.
- Save the account and review every warning or completion message.
cPanel's Modify an Account documentation says the change updates the account's Primary Domain, affected email, FTP and Web Disk usernames, and the server's DNS mapping for the new domain. The account's application code and hard-coded domain references are not rewritten. (docs.cpanel.net)
Keeping the username stable reduces the number of moving parts. As of May 22, 2026, a cPanel support notice about simultaneous username and primary-domain changes documented an ownership problem that could prevent existing email accounts from being deleted without a root-level file ownership repair. (support.cpanel.net)
If the new domain was never configured as an addon domain, the existing contents of public_html should remain in place and become the website served for the new primary domain. Confirm this rather than assuming it.
If the new domain previously had its own addon-domain directory, the intended website may still be in that retained directory. The host or site administrator must place the correct files in public_html, or deliberately reconfigure the server-level document root. cPanel's conversion procedure likewise treats content placement as a separate step from changing the account domain. (support.cpanel.net)
Changing a primary domain on the same account is not the same as moving to another server. If the hosting server or provider is also changing, use a full website migration guide and the cPanel-to-cPanel hosting transfer guide instead of treating the project as a domain rename.
Change the Primary Domain field first, keep the account username stable and put the intended site in public_html.
Host your website with our 5-star rated, cPanel website hosting plans.
Super fast servers, with security included and hosted in your choice of Australian Data Center.
View cPanel Plans
What must be fixed after the cPanel main domain changes?
The WHM edit changes account metadata and local server mappings, but it does not update every system that refers to the old domain. Application URLs, authoritative DNS, SSL coverage and external integrations require separate checks.
Separate automatic changes from manual changes

The primary-domain edit can update the cPanel account label, local DNS mapping, related subdomains and usernames for email, FTP or Web Disk accounts that contain the old domain. It does not reliably rewrite CMS databases, source code, analytics settings, webhooks, remote DNS zones, mail clients or old-domain redirects. (support.cpanel.net)
Search the website files and database for the old hostname. Check navigation links, canonical URLs, image paths, form actions, API endpoints, cookie domains, allowed-origin lists, scheduled tasks and notification addresses.
Update the application URL safely
For WordPress, update both the WordPress Address and Site Address, then perform a serialization-safe search and replace for old URLs where required. The official WordPress migration guidance recommends backing up the files and database and updating stored URLs when the domain changes. It also warns that multisite installations need different handling. (developer.wordpress.org)
Do not use an unrestricted SQL text replacement on a WordPress database. Serialized plugin and theme settings can break when string lengths change.
Point authoritative DNS and confirm SSL
The WHM edit may create or change a DNS zone on the cPanel server, but that zone only controls public traffic when the server is authoritative for the domain. If the domain uses external nameservers, copy the required records to that authoritative DNS provider. The cPanel Zone Editor documentation explains the A, AAAA, CNAME, MX and TXT records used for websites and mail. (docs.cpanel.net)
After the new domain resolves to the server, inspect it in cPanel's SSL/TLS Status interface. Confirm that the root domain and www hostname have active coverage before enabling Force HTTPS Redirect. If issuance or renewal fails, work through the SSL certificate renewal guide and ask the host to review the validation error. (docs.cpanel.net)
The WHM save is only the midpoint; application URLs, authoritative DNS and SSL still need separate confirmation.
How do you keep email working on both domains?
Existing cPanel email identities containing the old primary domain are renamed as part of the account change, but remote senders and saved mail-client settings still depend on DNS and the configured login name. Treat email as a separate cutover with its own inventory and tests. (support.cpanel.net)
After the change:
- Open cPanel Email Accounts and confirm that every expected mailbox appears under the new domain.
- Check that stored messages and folders are visible through webmail before editing desktop or mobile devices.
- Verify the new domain's MX records and Email Routing setting.
- Review SPF and DKIM in Email Deliverability, then confirm that DMARC refers to valid authentication records.
- Send an inbound message from an unrelated external mailbox and reply from the new address.
- Test SMTP and IMAP logins on at least one desktop and one mobile device if those clients are used.
The cPanel Email Deliverability documentation states that authentication records must be published at the authoritative DNS service. Installing a record only in a non-authoritative local cPanel zone will not make the public record effective. (docs.cpanel.net)
To keep receiving mail sent to the old addresses, retain the old domain and add it back to the account after it is no longer the primary domain. Create an individual forwarder for each known old address, such as sales@old-domain to sales@new-domain, and test it from outside the server. The cPanel Forwarders documentation explains that address forwarders can deliver mail to a new address, while domain-level forwarding applies only when the original address is otherwise undeliverable. (docs.cpanel.net)
The practical steps for creating and testing those rules are covered in the email forwarding guide.
Email is working only when both the new addresses and the old-address transition have been tested from outside the server.
How should the old domain redirect to the new one?
Keep the old domain registered and pointed at a server that can answer for it. Add a permanent 301 redirect from each old URL to its closest matching new URL rather than sending every request to the new homepage.
After the old domain has been added back to the cPanel account, use the Redirects interface or an application-aware redirect rule. The cPanel Redirects documentation defines Permanent as a 301 response and provides a Wild Card Redirect option that preserves the path when the old and new sites use the same URL structure. (docs.cpanel.net)
Test http, https, root-domain and www versions. The old domain needs a valid certificate because an HTTPS connection is established before the browser can receive the redirect response.
Avoid redirect chains. An old URL should make one permanent hop to the final HTTPS URL wherever possible, and changed page paths should have explicit mappings rather than relying on a homepage fallback.
Keep the old domain registered, secured and returning one clean 301 hop to the matching new URL.
Register your new domain name at competitive market prices including free domain add-ons like privacy, DNS Hosting, Custom Nameservers and Forwarding.
Always the best price and no nasty renewal price hikes.
Register A Domain Name
How do you test the change and know when to roll back?
Test DNS, the website, SSL, email, redirects and application functions as separate services. Roll back or pause further changes when a core service fails and the cause cannot be identified within the maintenance window.
Run a service-by-service acceptance test
| Area | Test | Pass condition |
|---|---|---|
| DNS | Resolve the root and www hostnames from more than one network | Both names return the intended hosting service |
| Website | Open the homepage, a deep page, the admin login and a form | Correct content loads without old-domain asset errors |
| SSL | Test the root and www versions of both domains | The new domain has a valid certificate and the old domain can redirect securely |
| Send inbound and outbound messages using old and new addresses | Messages arrive without authentication or routing errors | |
| Redirects | Test at least five important old URLs | Each returns one 301 response to the matching new URL |
| Applications | Test forms, checkout, login, scheduled jobs and webhooks in use | Each workflow completes and records the expected result |
Search server logs and browser developer tools for references to the old domain, redirect loops, certificate errors, blocked requests and failed callbacks. Record the test time, source network and result so a cached local result is not mistaken for a working public service.
Do not erase the old website files, old DNS inventory or account backup during the initial cutover. Keep the rollback material until the new domain has handled normal website and email traffic long enough for the business owner and technical administrator to sign off.
If the primary-domain edit itself must be reversed, ask the provider to restore the previous account domain or restore the full backup through WHM. Do not repeatedly remove and recreate domains while the host is still diagnosing account metadata or file ownership.
Do not close the change until DNS, web, SSL, email, redirects and application functions each pass a recorded test.
What else do cPanel users ask about domain changes?
These common questions describe different tasks that are easy to confuse with a primary-domain change. Identify the intended outcome before changing the account.
How do I change my primary website?
To change a primary website on cPanel, first back up the account and confirm which files should remain in public_html. Then ask the hosting provider or a root WHM administrator to change the account's Primary Domain, followed by DNS, application URL, SSL, email and redirect testing. (support.cpanel.net)
How to change domain root in cPanel?
cPanel users generally cannot change the document root of the Main Domain, which typically uses public_html. Additional domains can use separate document roots. If the primary site must serve from another folder, ask the hosting provider to review the server-level option rather than renaming the domain as a workaround. (docs.cpanel.net)
How do I add a second domain in cPanel?
Open cPanel's Domains interface, select Create A New Domain, enter the domain and choose whether it should share the primary domain's document root or use a separate folder. Adding a second domain does not make it the account's Main Domain and does not replace the provider-level primary-domain change. (docs.cpanel.net)
A primary-domain change, a document-root change and adding a second domain are three different cPanel tasks.
Experience Microsoft 365 Business Standard for free for 30 days.
Up to 25 users with full access to email, OneDrive and Teams. Includes full versions of desktop apps of Outlook, Word, Excel, PowerPoint and more.
Try Microsoft 365
Need help making the domain change safely?
If the account supports a business website or customer email, arrange the provider-level change before editing DNS or deleting any domain entry. Review UpTime Web Hosting's cPanel Website Hosting plans and ask the support team which account, domain and maintenance details are required for the change.
Schedule the change with a backup, a rollback owner and separate website and email tests before the maintenance window starts.








