If you use the Change Site's IP Address feature in WHM or the setsiteip api endpoint on a domain that has DNS records that are pointed to IP addresses outside of your cPanel server, you will find that those externally pointed records will be updated to use the new IP address that was chosen when using the tool.
We have received feedback that this behavior does not match the expectation that some of our customers have about the functionality of these tools:
Upon review of the issue, our development team has found that overwriting externally pointed records is the intended behavior of the feature and is not a defect.
As a result, our support department has filed the following improvement case with our development team: CPANEL-29524
In this improvement case, we have outlined the concerns that have been brought up by our customers along with the request to change the behavior of these tools so that they do not overwrite externally pointed DNS records.
Improvement cases are similar to feature requests in that they may or may not be implemented. Although, the more support from the cPanel community that we see for a particular improvement request, the more likely it is that the improvement would be implemented.
At the time of writing this article, we do not have any ETA for when this may be implemented or confirmation that there are plans to implement this improvement.
If you find that externally pointed records have been overwritten by this tool and you want to revert that change, you'll need to do the following:
1. Restore the account from a backup
2. Make a copy of the existing zone file via SSH or Terminal as the root user with commands similar to the following:
cp -v /var/named/domain.tld.db /root/zoneBackupCopy-Feb-26-2021-domain.tld/
3. Change the IP address of the domain/account as you did previously
4. Open the backup copy of the zone to view the old DNS records with the less command via SSH:
5. In WHM as the root user, navigate to: Home »DNS Functions »Edit DNS Zone
6. Manually amend the Zone file to restore the externally pointed DNS records by referencing the old zone via SSH and making the edits in WHM.
NOTE: While technically possible to edit the DNS zone directly on the command line, it is very easy to accidentally make bad edits and break the zone file, or follow an incorrect procedure to implement the change. Manual zone edits require more than just opening the file and directly editing it. Please make edits to the zone through the WHM or cPanel UI instead of SSH.