How to Modify Your Hosts File MacOS
Your hosting provider may offer you a temporary URL in the http://IP/~username
format (where IP
represents the server’s IP address and username
represents the cPanel account name) to access your website. This is useful, for example, if you migrate your website to a new server and want to test the site before you point the DNS records to it.
However, some sites will not work with a temporary URL. For those sites, you can configure your workstation with the server’s IP address. To do this, modify your workstation’s /etc/hosts
file to use the server’s domain name and IP address.
This document explains how to modify your workstation’s /etc/hosts
file.