Changing IP of Add-on Domain in cPanel

In cPanel by default any addon domain or subdomain will share the IP of the main domain account. But if you wanted a dedicated IP, This can be done through following steps:
First SSH into the server and edit the below file:

nano -w /var/cpanel/userdata/user/

In this file we can modify the IP of the subdomain or addon domain.
The content of the file will look like as:

documentroot: /home/user/public_html/sub1
group: user 
hascgi: 1 
homedir: /home/user 
no_cache_update: 0 
phpopenbasedirprotect: 1 
serveradmin: [email protected] 
usecanonicalname: 'Off' 
user: user 
userdirprotect: ''

Now change the IP to the new IP address.
Rebuild and Restart Apache:


Now we are all set to use the new IP.