Applicable to:
- Plesk for Linux
Question
How to change IP Address for domain in Plesk?
Answer
Note: If you don't have this menu or option, please contact server's administrator or Hosting Provider.
Log into Plesk and go to Domains > example.com > Web Hosting Access and choose from the drop-down list of all available IP addresses on a server.
Alternatively, the same operation can be performed via CLI. Connect to the server via SSH and execute:
# plesk bin subscription --update example.com -ip 203.0.113.3
To change IP for multiple subscriptions
-
Connect to the server via SSH
-
Create the list of all subscriptions:
# plesk bin subscription --list > /root/subscr.txt
-
(Optional) Edit file to remove subscriptions where changing IP address is not required
-
Run the following command to change the IP:
# cat /root/subscr.txt | while read i; do plesk bin subscription -u $i -ip 203.0.113.3 ; done
-
Connect to the server via SSH
-
Use the
subscription
CLI utility to change the IP addresses for all available subscriptions:-
For IPv4 addresses only:
# for sub in `plesk bin subscription -l`; do plesk bin subscription -u $sub -ip 203.0.113.2; done
-
For both IPv4 and IPv6 addresses:
# for sub in `plesk bin subscription -l`; do plesk bin subscription -u $sub -ip 203.0.113.2,2001:db8:f61:a1ff:0:0:0:80; done
-
Warning: In case there are resellers using IP 203.0.113.2, launching the command below will lock them and they will not synchronize with their Service Plans.
Warning: both IP addresses have to be present in Tools & Settings > IP Addresses list.
-
Connect to the server via SSH
-
Create the list of all subscriptions on a server, which IP addresses are equal to 203.0.113.2:
# plesk db -Ne "select d.name from IP_Addresses ipa join IpAddressesCollections ipac on ipac.ipAddressId=ipa.id join DomainServices ds on ds.ipCollectionId=ipac.ipCollectionId join domains d on d.id=ds.dom_id join Subscriptions s on s.object_id=d.id where ds.type='web' and ipa.ip_address='203.0.113.2'" > ip-list.txt
-
Use the
subscription
CLI utility to change the IP addresses for all subscriptions in theip-list.txt
file to 203.0.113.3:# while read i; do plesk bin subscription -u $i -ip 203.0.113.3; done < ip-list.txt
Note: It is not possible to have domains with different IP addresses in on subscription.
Take part in our product improvement and vote for this feature on Plesk UserVoice.
The top-ranked suggestions are likely to be included in the next versions of Plesk.
Comments
12 comments
This feature seems to be gone in Plesk Onyx 17.5??? PLEASE put it BACK!!!
@Bombicorp,
Hello! The option exists on Plesk Onyx 17.5. Please check, maybe you have no additional IP addresses to select, or there are no free dedicated IP addresses.
not available on my Plesk Onyx 17.8.11 Windows, anyone know how to enable it?
Hello @aqila abdurakhman, are you Plesk administrator?
Could you please explain in details what is missing?
Hello Alex, sorry i was miss understand between "Hosting Setting" and "Web Hosting Access" i thought it was the same menu, but i realise that it was different. now i can change the subscription IP.
Hello @aqila abdurakhman,
Glad to hear that!
Can it be done for all domains with one command, i just got a new ip
@Cem Sayar Check the section To change IP for multiple subscriptions in this article
Hi, I can't change my IP address, it can only be viewed, and there is no editing option for it... How can I change it? Is there any other options to solve it?
Hi Grace Yang please make sure you added a new IP in Tools and Settings > IP addresses before changing it for the domain in Domains > example.com > Web Hosting Access.
Hello, I have read all the comments and I cannot change my IP address
How many IPs have been asigned for your server. Do you have access as a root user?
Please sign in to leave a comment.