What is a hosts file? The file simply explained
Hosts files are primarily used in internet technology to allow your internet to find certain web pages. When you enter an internet address in your browser, computers, routers as well as various servers go through some processes through which the page can eventually be displayed.
What is a Hosts file? The basics of the Internet
To make it clear what a hosts file is for, you first need to understand the basis of how an input in your browser leads to an Internet page.- As soon as you enter a URL in your browser in the format [www.URL.domain], your computer sends a request to the server behind that name.
- A system called DNS (Domain Name Service) takes over the task of relating the name to a specific IP address, so that this address can be requested.
- By resolving the name to an address, communication can ultimately take place and you get the desired Internet page displayed.
- Before there was the DNS, however, the name resolution was regulated differently.
What is a hosts file? That's why it still exists
- Meanwhile, Internet technology no longer relies on this file, as it only notes a single line on your computer: [127.0.0.1 localhost].
- This line only says that the IP of your PC is just this number and the name behind it is localhost.
- When calling a web page, your computer nevertheless first looks into the hosts file to make sure that no name resolution has taken place so far before communication starts.