How to Change the Primary Domain in cPanel
A cPanel account's primary domain is renamed in WHM — Account Functions, Modify an Account — not from inside cPanel itself. On shared hosting that means a support ticket to your host; with root or reseller WHM access you can do it yourself. Files and databases stay in place.
Which route fits your access level, what the rename touches automatically, and the cleanup that follows.
knowledge
- Read time
- 6 min
- Sections
- 8
- Updated
- 14 Nov 2026
- Written by
- WebJi® team
Last editorial update: 15 November 2026.
What is the primary domain in cPanel, and why can't you rename it yourself?
The primary (main) domain is the identity of the whole cPanel account — set when the account was created — and cPanel's own documentation says it is changed through WHM, not through the cPanel interface. Every mailbox, FTP login, subdomain and the public_html document root hangs off it, which is why the rename lives one level above your cPanel login.
Which route applies to you depends purely on your access level:
| Your situation | Who makes the change | Where |
|---|---|---|
| Shared hosting (no WHM login) | Your hosting provider, on request | Support ticket; the host uses WHM |
| VPS or dedicated with root WHM | You | WHM › Account Functions › Modify an Account |
| Reseller with the account under you | You | Same WHM screen, with reseller rights |
On newer cPanel builds the Domains › Manage screen can rename domains, but cPanel's documentation routes a main domain change to WHM, and hosts can hide interface options in WHM's Feature Manager. If no rename option appears next to your main domain, that is expected — use the ticket or WHM route. The wider context of moving a live site to a new name is in changing your website's domain name.
What must be true before you request the change?
Two prerequisites, in this order: the new domain must not already exist anywhere on the server, and its DNS must point at that server. Skip either and the rename fails or lands on a name that resolves somewhere else.
- Clear the name: if the new domain is currently an addon domain, alias (parked domain) or subdomain on the same server, remove that entry first — one server cannot serve the same name under two identities.
- Point DNS: an A record to the server's IP, or the host's nameservers on the domain, so the server can validate and serve the name immediately after the rename.
- Plan email: decide whether mailboxes keep working under the new name or whether the old addresses need forwarders — before the cutover, not after.
- Pick the window: do the swap at a low-traffic hour, never in the middle of a migration or a campaign.
The ticket itself needs only three facts: the cPanel username, the current primary domain, and the new one. On WebJi® cPanel hosting (a separate product at ₹297/month before GST) you email support@webji.services with those three lines; support runs 24/7 in Hindi and English.
How do you rename the primary domain in WHM yourself?
WHM › Account Functions › Modify an Account is the screen that does it: select the account, type the new name in the Primary Domain field, and save. You reach the same screen from List Accounts by clicking the + next to the account.
- Log in to WHM as root (or a reseller who owns the account).
- Open Account Functions › Modify an Account and select the account.
- Replace the entry in the Primary Domain field with the new domain.
- Read the on-screen warning, then Save.
- Reissue the SSL certificate and rebuild redirects for the new name (next section).
Per cPanel's documentation, saving updates the usernames of any email, FTP and Web Disk accounts that include the old domain, and rewrites the account's DNS records to the new name. The account's files and home-directory paths stay unchanged — the rename is a relabelling, not a move.
What changes automatically, and what do you fix by hand?
cPanel updates everything attached to the account — mailboxes, FTP, Web Disk, subdomains, DNS — but nothing stored inside your applications, so hard-coded URLs are on you. This split is where most broken renames come from.
| Handled automatically | Your manual cleanup |
|---|---|
| Mailbox, FTP and Web Disk usernames move to the new domain | WordPress siteurl and home options; hard-coded old-domain URLs in themes, plugins and cron jobs |
| Subdomains of the old primary follow the account | SSL certificate for the new primary and its www variant (SSL/TLS Status › Run AutoSSL) |
| DNS records rewrite to serve the new name | 301 redirect from the old domain so bookmarks and search rankings transfer |
| public_html keeps serving the same files under the new name | Senders and letterheads: tell the world your email addresses changed if mailboxes moved |
One structural case needs attention before the change: if the new primary currently lives as an addon domain in its own folder (say public_html/newsite), copy its contents into public_html first, or edit the domain's document root under Domains › Manage afterwards. A straight rename of a name that has no folder serves whatever is already in public_html. Allow up to 24 hours for everything to settle, and check the site in a private window so cache does not hide the result.
How do you keep traffic, SSL and email working on the old domain?
Re-add the old domain as an alias or addon, give it a valid certificate, and 301-redirect it to the new primary — that preserves bookmarks, backlinks and search equity. A temporary 302 tells Google the move is not final, so keep it permanent.
- SSL on the old name: the redirect only works over https if a certificate still covers the old domain; run AutoSSL for it after re-adding.
- Email continuity: if any address must keep the old name, create mailboxes or forwarders on the re-added domain before you announce the change.
- Search engines: the 301 does the lifting; the wider checklist, including Search Console, is in the domain-change guide.
The SSL reissue steps with screenshots are in installing an SSL certificate in cPanel, and a full pre-change backup — the one thing you want in hand before any rename — is covered in the cPanel full backup guide.
Frequently asked questions
Will changing the primary domain delete my files or databases?
No. The rename relabels the account; public_html, databases and the document root stay exactly where they were and serve under the new name. What breaks when it breaks is configuration — hard-coded URLs, cron jobs and the WordPress siteurl — not data.
Why does cPanel say the new domain already exists?
Because that name is still attached somewhere on the same server — as an addon domain, an alias or a subdomain on your account, or under another account. Remove the entry (or ask the host to, if it sits under someone else's account), then repeat the rename.
Can I swap my primary and addon domains?
Yes, in two moves: delete the addon entry for the new name, then rename the account to it via WHM or a support request. Afterwards, re-add the old primary as an alias or addon with a 301 redirect to the new one. If the addon lived in its own folder, move its files into public_html as part of the swap.
Do I need WHM access to change the primary domain?
Only if you want to make the change yourself. WHM's Modify an Account screen needs root or reseller access, which is why VPS and dedicated users can do it and shared-hosting users cannot. On shared hosting you open a ticket naming the account, the old domain and the new one.
What happens to my email addresses when the primary domain changes?
Mailboxes under the old primary follow the account, and their usernames update to the new domain — cPanel's own change warning says email, FTP and Web Disk accounts all move. Addresses that must keep the old name need the old domain re-added, then new mailboxes or forwarders created on it.
Last editorial update: 15 November 2026. Prices follow the dated sources on this page; checkout confirms current charges.
Ready to get started with WebJi®?
Join 12,000+ businesses across India and overseas. INR pricing, 18% GST shown before payment and 24/7 email support in Hindi and English — average first reply under 60 minutes.