How to Change the Primary Domain in cPanel

How to Change the Primary Domain in cPanel Title Image

You have the ability to change the primary domain in cPanel through the Account Management Panel (AMP). You should register your new domain name before switching your primary domain to avoid errors.

A Warning Before You Change Your Main Domain in cPanel

cPanel was originally designed assuming that a new primary domain would mean a new site. It’s easy to change your primary domain, but please note — cPanel software only changes the primary domain as listed in certain places in cPanel and not within the site files.

If you have an already existing site using modern site building software like WordPress, changing the primary domain will leave the old site files in place and likely break your site until you troubleshoot and update your WordPress installation.

If you are new to cPanel, you may be surprised by just how much you will need to manually edit. We cover what does and does not automatically change below, but if you’re new to cPanel the breakdown is not intuitive. Take your time, make backups beforehand, and only change your primary domain if you need to.

Your old primary domain’s site files will be in the same place as the new primary domain’s site files will go. If you want to create a new site, you must move or remove those old files.

What Does and Does Not Automatically Change

Before we proceed with instructions on how to have your main domain changed, it is important that you understand what does and doesn’t change. The following items are affected when you change your primary domain: email, website files, subdomains, and your search engine rank.

  • Previous Domain Name: The previous main domain name on the account will be removed. If you still needed that previous main domain, you will need to log into your cPanel and add it as either a parked or addon domain name. Once the domain name has been changed, you will log into your cPanel via instead of
  • Subdomains: All of your will turn into For example, will now be
  • Search Engine Rank: If you are changing your website’s domain name, keep in mind that this could affect your rank in search engines. Google recommends that you set up a 301 redirect — especially when keeping the old domain, which lets search engines know the website is permanently moving.
  • Email: All of the email accounts created for will turn into accounts. [email protected] will now be [email protected]. If you still needed [email protected] then you will need to add to your cPanel again as either a parked or addon domain name and recreate the email account.

If you have a parked domain that shares email usernames with your primary domain, changing your primary domain to that parked domain can cause errors and incorrect email transfer. Remove the extra email accounts and parked domain from cPanel first to avoid any errors. If you need to preserve the email in those accounts, transfer the emails to another address first.

What About WordPress and Other Software?

If you are using a content management system or other website software (e.g. WordPress) Please be aware that simply changing the main domain may only be the start of configurations you need to change. Please make sure that you double-check your software’s documentation on changing the domain name. For WordPress, here is our guide on changing the site URL and home settings.

Can I Remove the Primary Domain in cPanel?

cPanel requires a primary domain to function. You don’t have to actually use the primary domain, but something has to exist as the primary domain for cPanel to work. If you need to use a placeholder domain, simply put a random phrase, random numbers, or a domain you do not own. You can still login to your account using your server’s hostname or another domain name, and can even work on your site in browser if you use a hosts file modification.

How to Change the Primary Domain in cPanel

Shared Hosting Accounts

If you have a Shared account, you can change the main domain name on your account through AMP:

  1. Log into AMP.
  2. Click the Change Primary Domain icon.
    Change Primary Domain Icon
  3. The following page will explain everything that will be affected. You can continue at the bottom if you agree to the terms. Any current addon domains will be listed in the dropdown box. Select the addon domain you’d like to change your primary domain to, or choose Enter Domain Name to type in a domain that’s not listed in the menu.
    Change Primary Domain in cPanel Everything Affected
  4. Click “Change Primary Domain” once you’re done.
  5. You will see a confirmation in your AMP panel like “Your primary domain has been changed to“.
  6. You can then log into your cPanel to see the new domain in your cPanel stats.
    Primary Domain Change cPanel Status
  7. You will also receive an email at your email account on file with a confirmation of the Primary Domain change.
    Primary Domain Change Email

Use WHM to Change Primary Domain

If you have a VPS or Dedicated Server hosting account, you can also change a cPanel account’s primary domain from within WHM.

  1. Log into WHM.
  2. Click on List Accounts.
  3. Click the plus sign by the account you want to change, then click on the Modify Account button.
    Change Primary Domain in cPanel WHM List Accounts
  4. Type the new Primary Domain in the box marked Primary Domain, then scroll all the way down to click on the Save button at the bottom of the page.
    Change Primary Domain in cPanel WHM Dialogue Box

Go Unlimited with Exceptional Shared Hosting

Upgrade your Shared Hosting today and take your business to the next level! Get unlimited NVMe SSD storage, cPanel, professional email and over $400 in savings.

check markFree Domain check mark24/7 Human Support check mark100% Money-Back Guarantee

Shared Hosting

InMotion Hosting Contributor
InMotion Hosting Contributor Content Writer

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

67 thoughts on “How to Change the Primary Domain in cPanel

    1. Hi Radhika, great question. The data for the primary domain is stored in the public_html folder. When you change the primary domain, cPanel will treat that folder as if it belonged to the new domain, and will automatically switch any email addresses tied to the old primary domain to the new primary domain, but other than that the site data is mostly untouched.

      This is a problem in some cases. If you have a WordPress site, all of the WordPress site files will remain tied to the old site domain and will need to be switched over, which can be a bit time consuming and error prone (though there are plugins to help with this).

      I generally advise people to leave their primary domain as-is and add new sites as addon domains. Back when cPanel was created, it really mattered which site was the primary domain, but things have changed in the last few years and today there is no meaningful difference between the two from within cPanel.

      Hope that helps, but let us know if you have further questions!

  1. I registered a primary domain last week and decided to change it today. I followed the instructions above. Will my account be automatically billed the $15.99 for the new domain? And do I need to buy new domain privacy, or it that now linked to my new primary domain as well? Thanks!

    1. You will need to register the domain before it can resolve to our servers and reflect your change. Yes, you will need to purchase Domain Privacy for this new address. Please let us know if you have any additional questions.
      Thank you,

  2. I have a main domain with a webpage on it ( I am developping a onlineshop in a subdomain ( Now, the online shop is ready for moving to

    I have readed al most all the post before, but I did not found a answer to my question.

    Please, can you explain me how to do in an easy way? Do I need change the links?


    1. This depends on if your site uses relative paths to or absolute paths for linking. If the paths are relative, the domain change won’t matter. But if you’re using absolute paths, they will need to be updated. If you’re using dynamic paths (like in WordPress) then the Site URL and possibly some of the internal linking will need to be updated.

  3. I’d like to switch my primary domain. I have not yet set up email or a website. How do I make the change?

    1. You can change the primary domain in your Account Management Panel following the directions above.

  4. If I want to swap my current primary domain with one of my add-on domains, is it safe to assume that the other add-on domain will be unaffected by the whole process?

    (Obviously there’d be a complete backup of everything regardless)

    1. All of the domains will be affected. I advise contacting our live support department. They can assist in the transition to make sure that everything goes smoothly.

    1. We are happy to help, but will need some additional information. What type of trouble are you having? Are you getting any errors? How can we test these issues?

      Thank you,

  5. Thank you for your prompt response. 

    Is the following a “clean” way to completely remove the main domain, and keep the addon: using partial backup, save the main and addon in separate files. Then delete all my files online. Then upload just the addon domain.

    My goal is to have a “blank” main domain, with an addon. Because in the near future I want to have a different main domain.

    If this is somehow complicated, please point me to instructions, or, if advised, I can offload the addon to another host.

  6. Hi I have a primary domain and an addon domain

    I need to delete www.primary, but want addon to still be visible. 

    I want to make sure all www.primary files get deleted. 

    Is it possible?

    Eventually I will upload www.primary again, though under a different URL name. I’ve backedup.

    Thank you

  7. HI,


    I have to change my company name and parallely I have to change my Website name as well. Do I need to take a new domain and start creating a website from scratch or is it possible to change the name and let thing be as it is on the website.


    I am very new to the IT thing. Please suggest.


    Thanks in Advance.

    1. You should be able to purchase the new domain name and move the website. Keep in mind you will have to modify/update the website to reflect the new name. For example, you will most likely have to change the website URL, logos, and branding. The steps to accomplish this will depend on how your website was designed and built.

      Thank you,

  8. At my request, inmotion hosting recently changed my domain name to  It’s been over 24hrs and my new domain name is still not resolving.  Any clue as to what is going on?

    1. Hello Akeyes,

      Sorry for the issue with your new domain name. First, I did check your domain and it is working in a browser – but the site looks to be missing content and formatting information. Second, if you did not clear your browser cache in your internet browser, then it’s possible that you are still dealing with an old version of your site saved in your browser. Finally, although your domain is resolving, if you did not move the content for your site, then you may still have complete that step in order to complete the primary domain change. The files are not moved during a domain change (as indicated in the article above).

      If you have any further questions, please let us know.

      Kindest regards,
      Arnel C.

  9. I have main domain and change to which already add domain in

    WP files in in folder public_html/domainB. If i change main domain to i move files in public_html/domainB to public_html and file public_html ( files) to another folder?

    1. You do not need to move any files or make a primary domain change. Just update your “WordPress Address / WP_HOME ” setting for your Website. There is no need to change your “Site Address (URL)” unless you move files.

      This is covered in our full guide Changing the Site URL and Home Settings.

      Thank you,

  10. Hi there, 

    I almost have similar request as Benny Powers above. 

    I have a main domain (, an Add-on domain (, and a subdomain under domainB ( Both the main domain and the addon domain have WP running on them. 

    Since I am allowed only 2 databases, I cannot get to install another WP site on my subdomain mentioned above.

    My site on the main domain ( has already served its purpose too, so I want to uninstall WP there which will free up a database slot.

    I then want to have as my main domain. 

    How exactly should I go about this? 

    Should I go ahead and uninstall WP on, then go through filemanager and remove any other WP residue files under the root directory and move files from rootfolder/ into the root folder. Then request to “Change Primary Domain” ?

    Or should I put the request to “Change Primary Domain” first, and then go about the files moving exercise?

    Will anything need to be done with database linked to

    Thanks for your assistance in advance. 




  11. You should also highlight that changing your primary domain will reset all your DNS records to the default entries. All of my changes and dns entries were lost after changing my parked domain to the primary domain. You should warn about this in the warning screen.

  12. I’ve got my primary domain serving out of public_html and several addon domains all in subdirs off of public_html. All of my domains, primary and addon domains, are pointed to cloudflare nameservers, which direct to my static IP here at InMotion. The primary domain also has some Google Apps DNS info on it. 

    Let’s call my primary domain and one of my addons Am I correct that because all my domains are pointed to cloudflare, that the steps to make primary and secondary would simply go like this:

    1. copy all the files and dirs in public_html to public_html/ and then remove the copies of the addon domain folders from there,
    2. remove all of the site files from that are in public_html and replace them with the contents of public_html/
    3. instruct cpanel to change primary domain
    4. All done. Throw a party.

    Is it more complicated than that? All sigtes are running WP.

    1. Hello Benny,

      Well, it’s ALMOST a party. You have most of it. The file movement is usually what confuses most people. DNS should stay the same, since they’re remaining here. Make sure to follow the directions above to request that the primary domain be changed. It will change the domain named as your primary domain as well. Also, if you have any configurations that use paths, you may need to adjust it for the change in location (for both sites).

      If you have any further questions or comments, please let us know.

      Arnel C.

  13. I am decommissioning my primary domain and want to make an existing add-on domain the primary domain for my account. I’ve read the docs and understand the process, but I previously changed the document root of my primary domain so that add-on domains are in parallel directories rather than under the primary domain in the file structure.

    How will this affect the change? Will I still have to move files for the new primary domain and where to?


    1. Hello Tim,

      Thanks for the question about the change in the primary domain. You will need to submit a verified support ticket to have your primary domain changed as your account name is based on the primary domain. Make sure to explain about the document root change in your request. Basically, the document root will need to be identified during the change. Please notify our live support team of your intended change so that your account is properly documented and the new primary domain is set correctly. You do not have to worry about making the change yourself.

      I hope this helps to answer your question, please let us know if you require any further assistance.

      Arnel C.

    2. Hello Arpita,

      Thank you for contacting us. Here is a link to our guide on how to change your email password.

      Since it is not clear what you are asking, could you provide some additonal information.

      Thank you,

  14. Wow, this is an amazing post i found after lot of research on google thanks for posting this article to changing my domain name.

  15. Hello,

    I want to change the primary domain for my account. How long does it take to make the change and after you change it from your side, how long will the website be down for? I am already taking backup of my exisitng files on the server and there is no email or sub-domain associated with the account.

    Thank you,

    Saptarshi Chatterjee


    1. Hello Saptarshi,

      As long as the new domain has already propagated to our nameservers the change should be instant with no downtime.

      Best Regards,
      TJ Edens

  16. Dear Sir,

    I would like to change my email address from to, is it possible to change at my end. And if I could changed the same what deficulties I could face and what things can affect. Please advise.

    1. Hello V,

      Thank you for contacting us. You can update the email address associated with your account in AMP at any time.

      This is just the email address you use to login to AMP, and we use to contact you with billing/news information.

      Since this is a public forum, I marked out your email address for security purposes.

      Thank you,

    1. Hello,

      I’m sorry, but I’m not sure what you’re asking. What are you trying to change exactly? Please give us a little more information and we can try to provide you an answer.

      Arnel C.

  17. Hello,

    the next week, I have to renew my hosting plan and domain; but I want to change it name and I don’t know to do it. 


    1. Hello Ever Mauricio Escoto,

      You will want to register a new domain name and then contact the Live Support to have them perform a Primary Domain Name change. As for the current domain name, you will need to have it set it to expire. The Support team can do that for you as well.

      You can change your hosting plan from within the AMP.

      Kindest Regards,
      Scott M

  18. … My primary domain name is, i did not renew the domain name

    i do not need the domain name or the website and files anymore

    i was to completly remove/delete  the complete website and its domain name.

    … my other subdomain website >> i have on your server i want it to be my new primay domain/website, but it is still in developement. when its ready i will remove  ( developer, and it will be )

    … should i wait till subdomain site is ready before remove/deleting  my  primary website and its domain?

    ….if i were to make my primary site RIGHT NOW, later when the site is ready i will still have to remove ( developer ) from the domain name. will that be a problem?

    …. and the reason i want to switch the domains right now is becuse my index.html page for my  site www. when launch from dreamweaver is showing a 404 error page with  this url showing in the browser >>>

    …. AND  my primary domain url>> when view through a browers displays my other website>>  www.  … i hope you understand all this. 

    i believe one of the links on this page is where i can go to delete my primay domain/site and replace it with my subdomain site

    1. Hello Hanif,

      If it were me, I would just wait until I was ready to go live to make the primary domain change. That way you only have to do it once and it can be done as the last change you need to make.

      As for your index page for the developer site. You do not need to reference it as:

      But simply

      The long URL you are using is not possible as the “/home/musice11/public_html” portion of the URL is not used when a domain name is used.

      Kindest Regards,
      Scott M

  19. Hi!

    I’m planning to move my main domain to another registrar, will this affect my other domains (parked domains or sub domains or add-on domains? Thanks. Please help.


    Best Regards,


  20. I started my WordPress with a primary domain name I no longer want. I have a new domain name I want to replace it with and there is no material/info I need saved with the first one. How do I do this? Thank you!


    1. Hello Brenda,

      If you just want to change the name of your site, then this article is how you do it. If you want to keep your WordPress site and reflect your name change, you will want to change the URL for your WordPress as well.

      Of course, if you do not wish to keep that, you can simply uninstall the WordPress from your server and once you change the domain name, start again with your new site.

      Kindest Regards,
      Scott M

  21. hi

    I want to ask you that if i change my website domain name will it affect facebook like box which i am using in my website

    1. Hello Prashant,

      I cannot say for certain as I cannot see the code involved. If the like box is simply linking to the facebook, likely not. If, however, the facebook widget relies on the domain name, it may. You will simply need to ensure it knows about the new domain name in that case.

      Kindest Regards,
      Scott M

  22. Hi


    I face problem in change domain from old one to new domain


    A set of dell machines is removed from one domain and it is connected to our domain,  but the old domain is not released..


    How to release old domain,  kindly help me


    thank you


    with regards


    Anto Vizhoni .M

    1. Hello Anto,

      Thank you for your question. We are happy to help, but will need some additional information. Do you want to point your domain, so it is hosted on our servers?

      Are you trying to release your domain and Register it elsewhere?

      If these are not what you are trying to accomplish, please provide more details on what you want to do.

      If you have any further questions, feel free to post them below.
      Thank you,


    1. Hello David,

      If you have made DNS changes such as the A record, the change does require about 24 hours for it to take effect. However, the HOSTS file change should take effect right away. I’ve been testing it here and it does work okay. I did have to remove your .htaccess file (I backed it up to htaccess-OLD). I was getting an odd error earlier, so I removed the dev.pprpix A record that you had added. It’s not really necessary for working on the WordPress site anyway.

      Once you have added the HOSTS file change properly, you can access the WordPress Admin with no problems – it will work as though you were running it directly off the server (which you are) . The main difference is that you’re simply tricking it into launching from the InMotion server, instead of the current A record location.

      Make sure that you clear your browser cache as it will try to use the cache to load the site as it was set previously.

      I hope that helps to clear up the issue. Please let us know if you continue to have problems

      Arnel C.

  23. I have done this, but now when i point to 1xx.xx.xx.xx or on my home computer (my inmotion host, and the root of my wordpress install), i just get an inmotion page like nothing is setup. Any idea why this would happen?

  24. Hi,

    I am developing a site for a client. They already have a site at which is hosted elsewhere. When the created the account with InMotion, they used as the domain. Their current site needs to stay up, and now when I try to use the temp link to get to the development site, it just redirects to I have no way to get to my development site now. How can I fix this? I have a wordpress install in the main directory of the InMotion host. Please Help.

    1. Hello David,

      Sorry to hear about the problem. This is probably the best thing to do: 1)Make an A record change (to point the domain name from InMotion to the old host, and 2)Make a HOST file change. A host file change will allow you to continue using the domain name to reach the account that’s located on InMotion’s server – but only from the developing computer. Anyone else on the internet will be re-directed to the original host based on the A record change.

      Our directions on making an A record change can be found in our Custom DNS records tutorial. There’s a video as well as a link the explicit directions for making A record changes. You will need to have the IP address of the server of your old host in order re-direct the domain name to that server.

      I’m assuming that your development site is on InMotion’s servers? It wasn’t clear that you were developing here with us. If that is the case, then you can use a HOSTS file change on your computer in order to point the domain name (either “” or “” ) to our server. When you have the hosts file in place, YOUR computer will think that when typing the in URL you assigned will be coming from our server. Follow the tutorial for instructions on changing the HOSTS file mod. We also have a Mac tutorial if you need it.

      That should help resolve your current issue. The site will be re-directed to the old site with the A record and the development site can be accessed from the developer’s computer. When you’re done, then you would need to need to remove the A record and also delete the HOSTS file entry in order to see the site coming from the InMotion server.

      Arnel C.

  25. i am very disappointed that inmotion advised me to have an ecommerce website as an add on this totally is screwing up my business plans with this website….

    1. Hello PAULO,

      Sorry to hear about the trouble you are having. What type of problems are occurring? You can always remove/uninstall the ecommerce software, or move it to another folder.

      Also, if you need a different CMS, we offer over 280 other free options in Softaculous. We can guide you in selecting the option that works for you, but it is your choice in the end.

      If you have any further questions, feel free to post them below.
      Thank you,


  26. I am letting the domain for what is currently set up as my primary domain name expire. I have an add-on domain which I will continue to use. If my primary domain name registration expires, what happens? My fear is that my files in the add-on domain will be lost. Thanks for your help.

    1. Hello Beth,

      If your domain name expires, it will not delete any files. We recommend performing regular backups of your website files, and storing them on your personal computer.

      If you have any further questions, feel free to post them below.
      Thank you,


Was this article helpful? Join the conversation!