I am missing my hosts file in Windows 8.1.  I couldn't find it in C:\Windows\System32\drivers\etc

Here is what I see in that location: hosts.ics, hosts.old, lmhosts.sam, networks, protocol and services.

How can I fix it?

  • Are you using Internet Connection Sharing?
    – Arjan
    Jun 21, 2015 at 13:03
  • Yes , I am using a software named connectify to do this Jun 22, 2015 at 4:27

2 Answers 2


The default hosts file contains only comments and is not needed for normal system operation:

# 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 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
# space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
#     rhino.acme.com          # source server
#     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#       localhost
#   ::1             localhost

(Lines starting # are comments in a hosts file.)

If the file's not present, an event will be logged on startup in the Windows event log, but it won't stop anything working.

You can simply create a new, empty text file called hosts (see Editing hosts file on Windows 8), and if you want to add your own custom entries, just and add them to it (as shown in the example comments in the default hosts file, but without the # at the start of the line).

  • Of course the hosts file is used for normal system operations, maybe you were thinking of hosts.sam in older versions of Windows. Jun 21, 2015 at 10:39
  • 2
    @Peter, please re-read my answer--of course it's used (if present), or why would I suggest adding custom entries to it! If it's missing, an event will be logged on startup, but that's all. So the OP needn't worry too much that the file's missing (although it would be better to reinstate it--I've edited my answer to this effect).
    – Reg Edit
    Jun 21, 2015 at 11:13
  • Okay, you are right, it is not needed for normal OS operation, but it is checked for and used when found. Windows created hosts.ics an d renamed hosts to hosts.old for a reason. I think you should not have both hosts.ics and hosts at the same time Jun 21, 2015 at 12:08
  • Are you sure hosts.ics is used when not using Internet Connection Sharing, @Peter? (See my comment to your answer.) What do the comments in that file say? I'm very much tempted to think you're wrong here, and Reg Edit is right: one can just create that hosts file if one needs it, and no need to worry if it's not there.
    – Arjan
    Jun 21, 2015 at 12:46
  • 1
    Problem solved , I renamed the hosts.old file to hosts which is similar to hosts file Jun 22, 2015 at 4:32

You have a hosts.ics file which if such file exists is used instead of the traditional hosts file.

You can verify this by adding a new entry to hosts.ics say   my.test.local

and then ping my.test.local

  • I'm not on Windows, but isn't that file for Internet Connection Sharing? (Some OLD posts I find through Google even show that in the header of that file, when opening it in a text editor, including: "This file has been automatically generated for use by Microsoft Internet Connection Sharing. It contains the mappings of IP addresses to host names for the home network. Please do not make changes to the HOSTS.ICS file. Any changes may result in a loss of connectivity between machines on the local network.")
    – Arjan
    Jun 21, 2015 at 11:21
  • From support.microsoft.com/en-us/kb/309642/en-us, which is old so maybe no longer accurate: "The Hosts.ics file is used by ICS to store information about dynamically configured clients. Avoid making changes to this file to prevent the loss of connectivity or data. The Hosts file (with no file name extension) is the file to which you add information about statically configured clients."
    – Arjan
    Jun 21, 2015 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.