How to edit Mac OS hosts file to view a domain name at a different IP address
As a website developer you may need to work on a domain name hosted at a different IP address.
Every domain name has it's own IP address.
If you wish to work on a website hosted at a different IP address, your Apple Mac OS computer provides a way to do this, called a "local hosts file."
Learn more at Google.com: What is a local hosts file?
For Apple Mac OS, the application Gas Mask will allow you to easily manage how your computer "resolves" domain names on the Internet.
By using Gas Mask to edit your local hosts file you will be able to force your computer to resolve the domain name to any IP address you wish, such that your web browser will see the domain at the alternate IP address.
Example text entry:
## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 10.10.10.10 my_domain.com www.my_domain.com 10.10.10.12 my_domain2.com www.my_domain2.com
- How do I view my website on the new server using my PC's host file?
- External link: How to Clear Your DNS Cache