Sometimes you may find you need to access a domain which you have not yet configured public DNS for. Did you know you can use your computer’s Hosts file to direct it to the correct IP address of the domain you are working on and preview the domain before you update your public DNS? This is a great way to preview a website that's in the process of being built or modified to make sure things work before you update your public DNS.
Modifying Your Hosts File in Windows
The Hosts file in Windows is conveniently located in C:\Windows\System32\drivers\etc\hosts.
...
Click File → Save to save your changes. You should now be able to access your domain at the IP address you assigned.
Modifying Your Hosts File in MacOS / Linux
Both Linux and MacOS locate the hosts file in /etc/hosts. MacOS in particular keeps this location hidden in the graphical interface, so you will need to edit the file from a command line. Assuming Linux users know how to access their terminal, this tutorial will be written with the MacOS interface in mind.
...
You should now be able to access your domain at the IP address you assigned.
Related articles
Content by Label | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...