Assigning a dedicated IP to a subdomain or an addon domain !

Under normal situations, when you add a sub-domain or an addon domain, it uses the shared IP or the dedicated IP of the main domain. This post will cover on how to use a dedicated IP for an addon domain or even a sub-domain. This can be for a scenario when you require the sub-domain to have an SSL certificate.

# login to your server via SSH and edit the file  /var/cpanel/useradata/user/, replace the current IP shown with the dedicated IP which you intend to.

# Run /usr/local/cpanel/bin/build_apache_conf

# Login into WHM and navigate to Main >> DNS Functions >> Edit DNS Zone >> select the desired domain for editing and update the A records now to the new IP address and click save.

#  In WHM go to  Main >> IP Functions >> Show/Edit Reserved IPs

# Reserve the IP you just used so that no new accounts can use this IP address in the future.

# Restart httpd and DNS services.

This is all about assigning a sub-domain or an add-domain with a dedicated IP.