{"id":61889,"date":"2021-08-18T13:39:54","date_gmt":"2021-08-18T18:39:54","guid":{"rendered":"https:\/\/blog.cpanel.com\/?p=61889"},"modified":"2021-08-18T13:39:54","modified_gmt":"2021-08-18T18:39:54","slug":"how-to-change-the-main-shared-ip-address-on-cpanel","status":"publish","type":"post","link":"https:\/\/devel.www.cpanel.net\/blog\/tips-and-tricks\/how-to-change-the-main-shared-ip-address-on-cpanel\/","title":{"rendered":"How to Change the Main Shared IP Address on cPanel\u00ae"},"content":{"rendered":"\n

cPanel & WHM\u2019s main shared IP address is used by new shared hosting accounts created on a server. This allows web hosts to create new accounts easily and automates the otherwise complex and time-consuming domain and web server configuration process. But what if you want to change the main shared IP address on your cPanel server?<\/p>\n\n\n\n

In this article, we outline a three-step process for changing a server\u2019s shared IP address. Changing the main shared IP is straightforward, but we assume you would like to add a new IP address, change the primary shared hosting address, and migrate existing shared hosting accounts to the new address. You can complete each of these tasks quickly within cPanel & WHM.<\/p>\n\n\n\n

To follow along, you need root access to a server managed with cPanel & WHM\u2014we\u2019ll be working in the WHM server administration interface. We\u2019ll focus on IPv4 addresses, but a similar process also works for IPv6 addresses.<\/p>\n\n\n\n

How to Add a New IP Address to Your Server<\/strong><\/h2>\n\n\n\n

First, you will need to arrange for a new IP address with your hosting provider. They will supply an IP from their available address space and configure their network to connect it to your server. In addition to the IP address, you also need the network\u2019s subnet mask. Subnet masks depend on the network\u2019s configuration, so you may have to ask your hosting provider which to use.<\/p>\n\n\n\n

Once you have a new IP address, you can configure your server to use it with WHM\u2019s \u200cAdd a New IP Address<\/em> tool, which you will find under IP Functions<\/em> in the WHM sidebar menu.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

For more information about adding a new IP address, see How To Redirect An IP To A Domain & Configure Domain Redirects In cPanel<\/a>.<\/p>\n\n\n\n

How to Change Main Shared IP Address<\/strong><\/h2>\n\n\n\n

Now that your new IP address is available for use within cPanel & WHM, the next step is to change the main shared IP address. The new address will be used when you create cPanel accounts in the future. Changing the IP address doesn\u2019t migrate existing shared hosting accounts, but we\u2019ll explain how to do that in the next section.<\/p>\n\n\n\n

You can change the shared hosting IP address in WHM\u2019s Basic WebHost Manager Setup<\/em> tool.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

In Basic WebHost Manager Setup<\/em>, scroll to the Basic Config<\/em> section. The first entry configures the IP address used when creating new virtual hosts for shared hosting accounts. Enter the new address, scroll to the bottom of the page, and click save.<\/p>\n\n\n\n

Do not enter an IP address that you have not already added to cPanel with the process we described in the previous section.<\/p>\n\n\n\n

Migrate Shared Hosting Accounts to the New IP Address<\/strong><\/h2>\n\n\n\n

Migrating cPanel accounts to use the new IP is the most complex of the three stages we\u2019re looking at today. But it\u2019s relatively straightforward with WHM\u2019s IP Migration Wizard<\/em>. Before we begin, you should be aware that:<\/p>\n\n\n\n