How to add dedicated IP to addon domain (or sub domain)

July 9, 2021 . 2 MIN READ

Normally when wanting to use a dedicated IP for a domain in cPanel the domain should have its own account. However if you wish to use a dedicated IP for an addon domain or even a subdomain this article will explain how. There a several reasons for wanting to do this, but mostly this is used for installation of an SSL Certificate.

Requirements:

SSH access
Basic Knowledge of SSH commands
Free IP to assign
WHM access or DNS zone editing privilege

Steps:

1. You will need to first add the domain to your cPanel account.

2. Login to your server via SSH.

3. Edit the virtual host file located at: /var/cpanel/useradata/username/addondomain.maindoman.com

3A. First you must locate the line with the current IP address and edit this to your desired dedicated IP address

3B. Save your file without changing anything else.

4. Now run /usr/local/cpanel/bin/build_apache_conf

5. Login into WHM and navigate to Main >> DNS Functions >> Edit DNS Zone

6. Select your desired domain name here and click edit.

7. Update your A records now to the new IP address and click save.

8. Next in WHM go to  Main >> IP Functions >> Show/Edit Reserved IPs.

9. Now reserve the IP you just used so that no new accounts can use this IP address in the future.

10. Lastly and finally, it is recommended that you restart both Apache and the DNS server.

http://www.vudoohosting.com/service/knowledgebase.php?action=displayarticle&id=1

Leave a Reply

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