Manually editing your hosts file to resolve the IP address and domain name will let you test your site on a different server. In other words, you can manually configure your domain name to the IP address of your choosing.įor example, one of the reasons you may want to edit your hosts file is because you’re in the process of migrating your website to a new server. However, your computer (in this case, a Mac) can use the hosts file to resolve your site to a different or specific IP address.
The DNS translates your URL (such as ) into an IP address that the server can interpret. Typically, your website is found using the DNS in the nameservers your domain is pointed to. What the Mac Hosts File Is (and Why It’s Important)