If for some reason, you wish to reset your Windows 7 Hosts file situated at C:\Windows\System32\drivers\etc you can follow these steps:
Click Start and type copy-paste in start search : %systemroot% \system32\drivers\etc and hit Enter.
If you are using 64 bit version of Windows, type %systemroot% \SysWOW64\drivers\etc.
Rename the hosts file to hosts.bak.
Next, create a new default Hosts file.
To do so, open a new Text file named hosts in the folder %WinDir%\system32\drivers\etc folder.
Copy-paste the following text into the notepad file:
# 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:
# 220.127.116.11 rhino.acme.com # source server
# 18.104.22.168 x.acme.com # x client host
# localhost name resolution is handle within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
Save the text file.
To block a website using the Hosts File, simply add the following entry:
You may want to also read this article on how to lock down your Hosts file.