Date First Published: 7th March 2022
Topic: Computer Networking
Subtopic: Network Identifiers
Article Type: Computer Terms & Definitions
Difficulty: MediumDifficulty Level: 7/10
Learn more about what the hosts file is in this article.
The hosts file is a text file stored on a local computer that translates domain names to IP addresses. On Windows, the hosts file is located: 'Windows > System32 > Drivers > Etc > Hosts'. It usually consists of an IP address followed by a domain name, such as:
127.0.0.1 example.com
Adding this entry to the hosts file will translate the reserved IP address used for local computers to the domain name ‘example.com’. Whenever a user types ‘example.com’ into their web browser with that entry in their hosts file, they will visit the webpages stored on their local computer, known as localhost. If the user has not set up a virtual server on their computer, they will see a screen displaying ‘IIS Windows’ in their web browser.
Note that adding entries to the hosts file for translating IP addresses to domain names has no effect on what other users on the internet will see when they type the domain name into their web browser. It only alters where the domain name points to on a user’s local computer.
IP addresses are always looked up by the hosts file first. If no entry is found in the hosts file, the IP address is translated into a domain name by DNS. If DNS is unable to look up the IP address, the lookup fails.
Adding entries to the hosts file can be used for blocking malicious or distracting websites, since when the local IP address (127.0.0.1) followed by the domain name is typed into the hosts file, the user will only visit webpages stored on their local computers or if there are no webpages, a screen with ‘IIS Windows’ will be displayed.
Most smartphones and tablets do not have a hosts file. On iOS devices, the hosts file does not exist. However, it is possible for rooted Android devices to have a modifiable hosts file, which can be edited with ES File Explorer.
If so, it is important that you tell me as soon as possible on this page.
Network Services Network Setups Network Standards Network Hardware Network Identifiers Network Software Internet Protocols Internet Organisations Data Transmission Technologies Web Development Web Design Web Advertising Web Applications Web Organisations Web Technologies Web Services SEO Threats To Systems, Data & Information Security Mechanisms & Technologies Computer Hardware Computer Software Ethics & Sustainability Legislation & User Data Protection