Edit host file on macos to access a domain from another ip.
sudo nano /etc/hosts
Add ip and target below local host entries
123.456.78.900 example.com
Use ctrl+0 to save and ctrl+x to exit nano.
Afterwards flush you dns cache:
osc >= 10.6 sudo killall -HUP mDNSResponder
osx < 10.6 dscacheutil -flushcache