• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question How to change local DNS on Plesk like hosts file on Windows

pleskuser67553

Basic Pleskian
Server operating system version
CentOS 7.9
Plesk version and microupdate number
Obsidian 18.0.43 update #1
I have a domain that is assigned to an IP address on the Internet, but I want to assign it to another IP address locally on a Plesk server - effectively a local DNS override. On Windows this is trivial to do on one line in the hosts file. Can this be achieved with similar ease in Plesk? This could be at a Subscription level, or server-wide.

My specific problem is I want to be able to retrieve data (say, via a PHP script in a cron) from the external web server A which will continue to resolve the domain, while the Internet points the domain at external web server B.

I looked at Tools & Settings > DNS Settings > Server-wide settings but was not confident about inputting 'syntax of named.conf' or if this the correct place.

I also tried to add the domain to a subscription, enabled its DNS and changed its A record there - no luck (I waited 24 hours in case of default TTL). There is a warning "The DNS zone was modified. If you would like to apply changes in the DNS template to this zone, either click the 'Apply DNS Template Changes' button" but I'm hesitant to click this because I'm not sure of its effects.
 
Back
Top