Cpanel Accounts, Shared IP, and Server Configuration

Timothy Kline

New Member
Good morning, everyone!

Having passed the 1-year mark with KnownHost as well as my first dedicated server after years of shared and then VPS hosting the past couple years before coming here, I can see now where I would've done things a little differently.

I'm hoping that there is a practical way to still make the changes I should've made, if possible without inundating Tech Support with more of my pesky tickets. ;)

One of the things that I would like to do, probably out of strictly a personal preference rather than any technical reason, is keep the mail server on its own current IP while moving the Cpanel accounts off that IP and onto their own shared IP. Might it be easier just to move the mail to a different IP? I'm going to guess that changing the mail's IP would be IMMENSELY simpler than batch-moving a couple dozen CPanels off the current IP. Except that I've already earned a "1 year and 1 month" status with blacklist monitors which, I again presume, lend weight to the validity of a mail server the longer it's been online.

I've found in WHM where there's something about selecting a Shared IP, but I really, really don't want to break anything because of my own inexperience in this area.

Is there a recommended way for me to accomplish this, so that the CPanel accounts that aren't already dedicated IPs can all share the same IP just as they do now, just a different IP from the mail server's assigned IP?

Thank you, in advance!
Timothy Kline
Hi Timothy,

In WHM if you go to Basic cPanel & WHM setup under Basic config you will find "* The IP address (only one address) that will be used for setting up shared IP virtual hosts." enter the IP you want to be used as your default shared IP.

To change your existing domains go to Multi Account Functions | Change Multiple Sites' IP Address. Select the sites you want to change then click the Change IPs of Selected Accounts button then you will have a dropdown box for each domain to select the new IP. Select the IP you want for each domain then click the Change IPs button.

This should be pretty painless however I'm not sure that it will leave your mail server on it's existing IP as it may automatically follow the IP for the domain. If you find that is the case then take a look at cPanel's documentation on how to change it to a specific IP.

Good luck and let us know if you have any issues!
This is done via /etc/mailips. The format is

'<domain>: <ip for mail>'

If you want all mail to use the specified IP, then it would be

*: <mail ip>

You'll need to have proper rDNS and A records for the new mail ip for mail to not be rejected.
if I may, I would like to chime in here with a question as this is something I have been pondering for a while but not got around to looking into it yet:

I would like to setup my VPS so that some clients are on their own IP address while most others are on a shared IP. I have done this, I now have a total of 4 IPs on the VPS, but I at the moment the separation doesn't seem to apply to the mail settings. Can I take it from the above that I can set certain domains to use certain IPs for the mail? and if so is it as simpe as Freddies post above?