How to edit a host file in Windows, using Hosts File Editor
Windows borrowed a lot of patterns from BSD systems during the implementation of the network. One of the most important modules of the operating system that supports addressing in computer networks is the hosts file. Its role is to translate friendly domain names into their numerical equivalents, i.e. IP addresses. Thanks to this it is easy to identify the computer in the network, without the need to remember complicated numbers.
Editing hosts file allows you to quickly and easily connect to hosting or server if you do not have an active or directed domain yet. This is especially useful when migrating services or testing a new website.
A hosts file is a text file containing an IP address on each line, as well as one or more domain names of the host, which can be separated by spaces or tabs. Lines beginning with hash are comments (and are therefore ignored).
In Windows, the default path to the file looks like this:
Here is how the default document looks like:
# Copyright (c) 1993-2006 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 126.96.36.199 rhino.acme.com # source server # 188.8.131.52 x.acme.com # x client host # localhost name resolution is handle within DNS itself. # 127.0.0.1 localhost # ::1 localhost
Here’s how the default document looks like:To edit and save, it’s best to copy the file to the desktop, change something, save and overwrite it in the default system path. Microsoft has also prepared a special guide on how the default hosts file should look like.
However, you can simplify everything and take advantage of the fully graphical tool called Hosts File Editor. This is a small application that edits the hosts file without having to do the process described above. Below we present the appearance:
Unmarked lines are inhibited, i.e. inactive. Selecting one of them and saving them will activate. The program can additionally create different profiles and archive versions, so that we can have a huge variety of choices. One of the most interesting options is the ability to completely disable all configurations, as well as the option to restore the default appearance.
Check other blog postsSee all blog posts
- Read more
Many clients of hosting companies are mistakenly convinced that a hosting provider will solve their problems and take care of their crucial issues, while maintaining their website hosted on their servers. (Un)fortunately, that doesn’t work that way. What are the things your hosting won’t do for you? It won’t do the dishes, design a website,…
- Read more
My mind’s made up. You’ve had enough of the silly hosting or cosmic costs of its maintenance and finally you decide to move the site you’ve placed on WordPress. How to move WordPress to another server? What do you need to remember and how should you prepare for it? Migration of WordPress to another server…
- Read more
Google Workspace is probably the best business mail for your work. Great anti-spam filters, full control over your data, the fact you can choose a country where your data are stores, a calendar, Google Meets… these are only a fraction of what G Suite offers. Take a look at why you should consider switching to Google…