This brief tutorial shows students and new users how to edit or modify Windows 10 local hosts file.
When you think of a hosts file, think of it as plain-text file used by the operating systems to map IP addresses to hostname on the local computer. The hosts file has priority over DNS.
When you type a domain name in your browser to go to a website, your computer translates the domain name your typed into an IP address and connect to the server that hosts the website.
While translating the name to IP, the local hosts file is the first file your operating look at. If the IP to domain mapping isn’t included in the host file, then it looks up a DNS server online. This is how the process works.
When you’re dealing with hosts file, the IP address and the domain or hostname should be separated by at least one space or tab. The lines starting with # are comments and are ignored.