When I set up a new website on a server I dont want to use an interim domain. Therefore in PLesk I set the new project up as if the DNS already uses the new IP. Of course then you usually cannot access that new project to finalize configuration. But ther eis an easy fix. Just quickly edit the HOSTS file and manually enter the new IP. You – and only you – can access the site on the new server and finalize everything. When you are done just reset the HOSTS file and change the DNS settings in the domain.
- Open the terminal Programm on your Mac (press „Command“ + „Space“ and enter „Terminal“)
- Enter this command
sudo nano /etc/hosts
- Move the cursor to the bottom of the file with the arrow kerys
- Enter the IP followed a space and the domain:
192.0.0.1 example.com
- Enter the IP followed a space and the www-domain:
192.0.0.1 www.example.com
- Press „Ctrl“ + „O“ to overwrite the existing file and press „Enter“ to confirm
- Exit by using „Ctrl“ + „X“.
- YOu might need to flush the local DNS-Cache but i never had to to that:
sudo killall -HUP mDNSResponder