The Hosts file, is a plain text file that is used to map Domain Names to IP Addresses. Hosts file entries, bypass the DNS (Domain Name System) and for that reason is used to specify a different IP Address to a website, on the computer which used. This is helpful, in cases that you want to block a specific site on your computer, or you want to work and test your new website before publishing it.
If the Hosts file is wrong, because has been invalid modified by the user or by a malicious software, then causes Internet connectivity problems, such as re-directions to malicious websites, slow or no Internet access, etc. On all that cases you have to fix the Hosts file by resetting it to its default clean state.
How to reset HOSTS file to default settings in Windows 10, 8, 7 or Vista.
3. Select and copy the below text (in red) to Notepad. *
# 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
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.
# For example:
# 22.214.171.124 rhino.acme.com # source server
# 126.96.36.199 x.acme.com # x client host
# localhost name resolution is handle within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
* After the copy the Notepad should look like this.
4. From the File menu select Save As.
5. Give to the new file the name hosts and delete the .TXT extension.
6. Now copy or move the new hosts file to C:\Windows\System32\drivers\etc folder.
7. Select to Replace the file in the destination.
8. Finally, for the changes to take effect, restart your computer or open an elevated command prompt and enter the following command: ipconfig /flushdns
Important. If you hosts file has been modified by a virus, don’t forget to scan and clean your computer by following this guide: How To Scan Your Computer for Viruses and other Malicious Programs (Malware Removal Guide).
That’s all folks! Did it work for you?
Please leave a comment in the comment section below or even better: like and share this blog post in the social networks to help spread the word about this solution.