Assign Multiple IP Addresses on One Account

Rate this post

By default, cPanel supports the usage of one dedicated IP per account. However, you can get around this by editing just a few files on the server. Here are the steps:

1. Edit /var/cpanel/userdata/$user/$subdomain.$maindomain for each subdomain (for addon domains you’ll usually edit the file for the subdomain associated with the addondomain) and change the ip value to a ‘dedicated’ ip.

2. Delete the associated .cache file for the file you just edited

3. Run /scripts/rebuildhttpdconf

4. Edit the dns zone for the subdomain (which will likely be attached to the parent domain) and update the a-record to point to that IP as well. Then syncronize the zone out to the DNS cluster, if one exists:

/scripts/dnscluster synczone <parentdomain>

5. Edit /etc/domainips and add an entry for that sudomain to point to the IP and run /scripts/rebuildippool to make sure the IP is marked as taken.

Don't be selfish, share!Tweet about this on TwitterShare on RedditShare on TumblrBuffer this pageDigg thisShare on FacebookFlattr the authorEmail this to someoneShare on Google+Pin on PinterestPrint this pageShare on LinkedInShare on StumbleUpon

9 Comments

  1. Mike D Reply

    Hey, Thanks for the post. I can’t seem to get the last step to work. I have added the entry for the domain and ip address but it dosn’t show the address as taken. Any Suggestions?

  2. Peter Reply

    This depends on if you got shared or vps hosting? Cause i have shared hosting and i’ve studying how to have mupltiple ip on one cpanel.

    Thanks for reply

  3. Kerry Reply

    I ran into the issue of it saying:

    /scripts/rebuildhttpconf

    Wasn’t a file.

    After a little research, I saw other places saying to do “httpd” not “http”:

    /scripts/rebuildhttpdconf

    And it worked.

  4. Pingback: Installing A Wildcard SSL Certificate :: The cPanel Admin

Leave a Reply

Your email address will not be published. Required fields are marked *

Log in