DNS CLINT EVENT1012 : There was an error while attempting to read the local hosts file.

HP HANSORA 60 Reputation points
2025-09-15T18:55:31.3666667+00:00

HI,

I have tried all to hosts file update and sfc scann and also clean reinstall windows. still error showing in envent id randamly i cant catch reason for not read local hosts file.

There was an error while attempting to read the local hosts file. event id : 1012, DNS Client Events.

Plz help me for resolving this error.

Windows for home | Windows 11 | Security and privacy
0 comments No comments

Answer accepted by question author
misar 241 Reputation points
2025-09-15T19:22:28.37+00:00

The HOSTS file should be located here: C:\Windows\System32\drivers\etc

If it is not present that would explain the error, otherwise open it with a text editor and check for corruption.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

2 additional answers

Sort by: Most helpful
  1. misar 241 Reputation points
    2025-09-17T08:51:06.93+00:00

    Windows no longer uses HOSTS by default and provides a "blank" version which can be edited if you wish to use it. Open HOSTS in a text editor as I said previously and the default version should look something like this:

    # 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:

    #

    # 102.54.94.97 rhino.acme.com # source server

    # 38.25.63.10 x.acme.com # x client host

    # localhost name resolution is handled within DNS itself.

    # 127.0.0.1 localhost

    # ::1 localhost

    Note that this version does nothing - the # on each line denotes it as a comment.

    If your version is different and you don't know why I suggest saving a copy as HOSTS.old and replacing the content with the default (ie the text shown above).

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  2. HP HANSORA 60 Reputation points
    2025-09-15T19:51:27.5233333+00:00

    yes, located in given place and how can i check to whether corrupted or not?

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.