On Windows 10
1)Â First, navigate to C:\Windows\System32\drivers\etc.
2)Â Right-click on hosts > Edit with preferred file editor (Run as Administrator). You can use Notepad
3)Â Enter the domain following the server IP address
eg:
8.8.8.8 MyDomain.com www.MyDomain.com
4)Â Finally, save the file.