Changing a Site’s IP Address
- Written by Vanessa Vasile
- Published in Apache, DNS, Howto, Networking
- 9 Comments
There are three ways to change a site’s IP address on a cPanel server:
Go to WHM > Change site’s IP Address , select the account, then select the IP
Via Command Line:
/usr/local/cpanel/bin/setsiteip -u $user $ip
(This is also useful for changing the IP address of a single domain in an account, without affecting other domains on that account)
1) Edit /var/named/domain.com.db, change the domain’s A records, increment the serial number, and sync the zone out. For help in changing DNS, see this post. To sync a zone:
/scripts/dnscluster synczone $domain
Obviously, you do this on whatever server acts as a nameserver for the domain in question.
2) Replace instances of the old IP with the new IP in /var/cpanel/userdata and /var/cpanel/users
replace 220.127.116.11 18.104.22.168 — /var/cpanel/userdata/user/*
replace 22.214.171.124 126.96.36.199 — /var/cpanel/users/user
3) If the new IP is shared, remove the user’s main domain entry from /etc/domainips. If it’s a dedicated IP, add/change the IP in /etc/domainips and /etc/ssldomains (if the site has an SSL)
4) Run /scripts/rebuildhttpconf and /scripts/rebuildippool, and restart Apache
Pingback: Installing A Wildcard SSL Certificate :: The cPanel Admin
Pingback: Changing the Shared IP Address of a Live Server | Cheap Webhosting Domain Register
Pingback: Changing the Shared IP Address of a Live Server | BEC Community Blog
hah! I feel dumb. I didn’t know this:
When doing it from the command line.. I always did it the manual way. The more you know lol.
Pingback: SERVERTECHS » Blog Archive » Installing A Wildcard SSL Certificate
hi this manual is’nt enough
plz more help!
could u please tell me how to add multiple ip in a cpanel?
Pingback: Installing A Wildcard SSL Certificate
Pingback: cPanel :: Change Website's IP | :: b l a c k o n s o l e ::