The ” Hosts ” file is an important system file in Windows operating systems that maps a hostname to an IP address. It’s a simple text file. It is stored in the folder ” C: Windows System32 drivers etc ” in 32-bit versions of the Windows operating system. In 64-bit versions, it is also can be stored in the folder ” C: Windows SysWOW64 drivers etc “.

The host’s structure is straightforward. It contains lines of text containing the IP address followed by the hostname.

Sometimes this Hosts file gets attacked by viruses, adware, spyware, or trojan software and is modified to redirect your web browser to various websites containing malicious code. It can also block security websites and Windows Update websites in your system so that you cannot install security updates and antivirus in your operating system.

If you are also facing a similar issue, you should check the Hosts file and contain the defaults. To reset the hosts to default, you can follow these simple steps:

Note: If you do not want to do it manually, you can download the default hosts file or download the tool that automatically sets the Hosts to file back to default released by Microsoft.

Restore the Hosts file to the default

Step 1. Click

or enter the search box in Start

Step 2. Now you will see a file called hosts in the folder open.

Khôi phục File Hosts về mặc định ban đầu trong Windows

Step 3. Open the file in Notepad and replace its contents with the following line:

For Windows 7, Windows 8, Windows 10:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP / IP for Windows.
#
# This file contains the mappings of IP addresses to hostnames. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column, followed by the corresponding hostname.
# The IP address and the hostname should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

# localhost name resolution is handle within DNS itself.
# 127.0.0.1 localhost
# :: 1 localhost

For Windows Vista and Server 2008:

# 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 hostnames. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column, followed by the corresponding hostname.
# The IP address and the hostname should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost
:: 1 localhost

For Windows XP and Server 2003:

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP / IP for Windows.
#
# This file contains the mappings of IP addresses to hostnames. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column, followed by the corresponding hostname.
# The IP address and the hostname should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost

Step 4. Save the file, and you have reset the host’s file to default by removing the “.txt” extension. Good luck!