What is a computer host file and how to edit a host file?
Sometimes you will need to edit the host file on your computer. Through file hosts, you can control access to websites and network traffic.
The host file has been in use since ARPANET. They are used to resolve host names before DNS.
Microsoft keeps the hosts file in the Windows network, which is why it changes so little even if it is used in Windows, macOS or Linux.
The first part will be the location to redirect the address, the second part will be the address you want to redirect and the third part will be the comment. They can be separated by a space, but for readability are usually separated by one or two tabs.
Windows 8 or 8.1 and 10
If you use Windows 10, the way to edit the host file will look like this:

When you're done, open the following file using the File -> Open feature: c: windowssystem32driversetchosts

You can then edit as usual.
Windows 7
To access the hosts file in Windows 7, you can use the following command in Run to open notepad and file.

When notepad is open, you can edit the file. In this example, we will block Facebook. To do this, simply enter the following after the www.facebook # com

After editing the host file, save it.

Now if you try to access Facebook in IE it won't work. We also cannot access Facebook through Google Chrome.

macOS (Any Version)
In macOS, accessing the host file is also quite easy. Start in the terminal and use the editor.

The files will look a bit like Windows, though not as intuitive. Again we will block Facebook.

This time use 0.0.0.0 as a loopback and will direct you to the computer's Apache test page.
You should read it
- How to create a new host file on Windows
- How to open the Host file on Windows 10, edit the hosts file
- How to edit the Host file, how to edit the Host file, read and open the Host file
- How to fix the hosts file on Windows 10
- How to host your own website on Raspberry Pi
- How to open the hosts file with Admin rights - Apply to open the file system
- Protect computer network with Bastion host (fortress server) in just 3 steps
- Fix Service Host Local System status using multiple CPUs in Windows 10
May be interested
- Add 'Take Ownership' on Windows Vista, 7, 8, and 8.1to gain administrative privileges of system files, folders in windows is not a simple task. you can apply to edit the facebook host file
- TOP 5 ISO file editing software on Windows 10/11this guide includes some unique third-party tools that you can use to mount and edit iso files easily.
- What is a config file? How to safely edit the config file?software configuration text files are called config files (configuration files). if you want to improve your computer's knowledge, you will need to know what the config file is and how to edit it.
- Edit Hosts file to access Facebook 2014sometimes due to the fault of the network provider, you cannot access facebook, i will guide you to fix the host file in windows so that you can log into facebook stably.
- How to Edit APK Filesthis wikihow teaches you how to edit the contents of an apk file. to edit the files inside, you'll need to decompile (and then recompile) the package using apktool on a computer. editing apk files requires knowledge of java, as well as the...
- PDFio.co - Service of creating, protecting, converting PDF, ... online, support Vietnamese, free on many devicespdfio.co is a free and account-free web service that allows you to edit pdf files easily at any device without software.
- What file is M4A? How to open, edit and convert M4A filesthe file is part of an extension .m4a is an mpeg-4 audio file. they are usually found in apple's itunes store and are considered as the default format of songs when downloaded.
- The reason and how to edit sudoers file in Linuxin a linux or macos system, there is a file called 'sudoers' that controls the deepest levels of your system permissions. it allows or denies a user to gain superuser access and holds some special options for sudo.
- What file is XSD? How to open, edit and convert XSD filesa file with the .xsd extension is most likely an xml schema file. this is a text-based file format, which defines the validation rules for xml files and explains xml forms.
- How to reset HOSTS file on Windows 7/8 / 8.1 and Windows 10in the age of facebook people and facebook houses, access to facebook on computers and phones has become increasingly important. among the methods to access facebook, we have heard about editing hosts files on windows. so what is this hosts file? how does it work but divine? please learn about this concept with the following article of tipsmake.com!