If you’re working on a new website and have not set up the appropriate DNS, or waiting for the DNS to propagate, you can edit the hosts file on your computer as a temporary solution.
The hosts file is located at “C:\Windows\System32\drivers\etc”. The the location is the same from Windows XP right up to Windows 10.
To edit the hosts file you will need Administrator access. If you have the appropriate access, follow these steps.
- Drag the hosts file to Desktop.
- Edit the file with notepad.
- Start with the IP address of the server, press tab once, then enter the domain name.
- Save and close the file.
- Drag it back to “C:\Windows\System32\drivers\etc”
You need to drag the file to Desktop as you cannot edit the file directly from the original folder. If you want to remove the line that you have added, you have easily place a “#” before the IP address to comment out the instruction.