All the operating systems contain a special hosts file that maps the domain names to their IP addresses. In Windows 10, this file can be found in the C:\Windows\system32\drivers\etc\ folder. When a program tries to resolve a domain name to the respective IP address, it first consuls the hosts file. When the queries domain is not found inside the hosts file then it queries the DNS server configured for your system. Depending on how the program is designed, it can bypass the hosts file and directly check the DNS servers.
By manipulating the entries in the hosts file, you can direct a domain name to a different IP address or give a non-working IP address resulting in blocking that domain name. Whatever you want to do, you can use a free tool called Hosts File Editor+ to manage the hosts file in your Windows PC. This tool allows you to easily edit your hosts file, backup it and restore it from the backup. You can also use it to restore the hosts file to the default state (containing no entries).
Adding or editing entries using Hosts File Editor+ is very easy. You can just select an entry from the list and its values (domain as well as IP address) will be displayed in text boxes from where you can edit and save them. For adding new entries, you can type in the domain and IP address before clicking on the Add button. Similarly, you can delete an entry from the hosts file.
Hosts File Editor+ comes with many other useful tools. For example, it allows you to quickly block some of the popular websites such as Twitter, Facebook, Instagram, etc. You can change the DNS servers, flush DNS cache and even change the MAC address of your network interface.
Conclusion: Hosts File Editor+ is an open-source cross-platform app to manage the hosts file. It is great at allowing you to add group based entries to the hosts file, but does not allow editing previously added entries.
You can download Hosts File Editor+ from https://hostsfileseditorplus.weebly.com/.