What is the Hosts File?How to Reset the Hosts File Back to Default in macOSHow to Restore the Hosts File Back to Default in Windows
What is the Hosts File?
The simplest explanation is that it is a text file used by your computer to map a connection between an IP address and domain names. It can be edited to test certain network aspects or to troubleshoot connectivity issues. Of course, you should keep a backup of it before editing. But in case you do not, you can still recover the original version as explained below.
How to Reset the Hosts File Back to Default in macOS
On a Mac, the hosts file mostly contains nothing more than a couple of lines of active code. The rest of the stuff is just commented out (description of the hosts file itself). To reset, we are going to open the hosts file in a text editor, replace the entire file with the default text and save it. That’s it.
How to Restore the Hosts File Back to Default in Windows
With this huge update to the hosts file, you might want to restart your computer. The hosts file is usually used just to map web addresses to specific IP addresses and to block websites (by re-directing/mapping them to invalid/incorrect IPs). Signing off… This is how you can reset hosts file to default. Once you change it to default, it may resolve some connectivity problems that you have with your computer. You may like to check:
How to Restore your Mac from a BackupHow to Restore Previous Versions of your Files on Mac4 Ways to Backup Your Mac