Assign Dedicated IP Address to Subdomain or Addon Domain

1. Edit your subdomain or addon domain configuration file:

nano -w /var/cpanel/userdata/usuario/

Content should be similar to this:

 format: combined
 target: /usr/local/apache/domlogs/
 format: "\"%{%s}t %I .\\n%{%s}t %O .\""
 target: /usr/local/apache/domlogs/
documentroot: /home/username/public_html
group: Group1
hascgi: 1
homedir: /home/username
owner: username
phpopenbasedirprotect: 1
port: 80
 path: /home/username/public_html/cgi-bin
 url: /cgi-bin/
 path: /home/username/public_html/cgi-bin/
 url: /cgi-bin/
serveradmin: [email protected]
usecanonicalname: 'Off'
user: username
userdirprotect: ''

2. Edit the IP line and add your new IP, as you see below:


Save the changes now.

3. Rebuild and restart Apache to apply changes:


4. Edit the A registry at the DNS records for the subdomain/domain chosen, and add the new IP address. You can do this from WHM > Edit DNS Zone.

5. Finally, mark your IP as reserved from WHM > Show/Edit Reserved IPs

Was this helpful?