Host file isn’t working

Solved
isa_2643 Posted messages 10 Status Member -  
isa_2643 Posted messages 10 Status Member -

hello, my HOST file isn’t working.

here is the screenshot :

everything is properly filled in, I think, but access isn’t blocked...

could someone help me? Thanks

# 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

127.0.0.1 www.instagram.com
127.0.0.1 www.tiktok.com
 

7 answers

  1. isa_2643 Posted messages 10 Status Member 1
     

    thank you !!!!!!!!!!!

    it works !!!!!!!!!!

    so happy !!!!

    1
  2. brucine Posted messages 25267 Registration date   Status Member Last intervention   4 187
     

    Hello,

    there must be a tab between the IP and the domain.

    0
    1. isa_2643 Posted messages 10 Status Member 1
       
      It doesn't work...
      0
      1. brucine Posted messages 25267 Registration date   Status Member Last intervention   4 187 > isa_2643 Posted messages 10 Status Member
         

        The local host is by definition not read except under special circumstances (server, redirection); try replacing 127.0.0.1 with 0.0.0.0

        The hosts file is at C:\Windows\System32\drivers\etc but cannot be saved after modification with Notepad or whatever because it is protected.

        Make a copy on the desktop, modify it, copy it back to the original location choosing to replace: the machine asks for administrator rights, proceed:

        I have thus successfully locked myself out of Google.

        0
      2. brucine Posted messages 25267 Registration date   Status Member Last intervention   4 187 > brucine Posted messages 25267 Registration date   Status Member Last intervention  
         

        The situation is persistent; if we get kicked out from somewhere we shouldn't have been, or vice versa, clear the DNS cache at the command line:

        ipconfig /flushdns

        0
      3. isa_2643 Posted messages 10 Status Member 1 > brucine Posted messages 25267 Registration date   Status Member Last intervention  
         

        I managed the first step until the PC asked me for administrator rights + to continue.

        but when I tried on Google, Instagram it opened

        there really is something that isn’t working …

        on the other hand I didn’t understand: clear the DNS cache? what is it and where is it?

        0
  3. choubaka Posted messages 5535 Registration date   Status Moderator Last intervention   2 113
     

    Hello, as explained by brucine..

    You must open a DOS window.

    Do a search for "cmd"

    In that window type the command "ipconfig /flushdns" to clear the memory of the last DNS entries..

    Another solution is to restart the computer...

    Note that the hosts file is read only from the moment the computer is turned on; the contents of the file are then copied into what is called the DNS cache ... This is volatile memory that contains all DNS requests (successful or not) and that has a lookup duration as long as the PC is on.

    Now, I don’t understand the 127.0.0.1 entry related to websites .... this IP represents the machine itself..

    What is the purpose?


    0
    1. isa_2643 Posted messages 10 Status Member 1
       

      nothing works ....

      I am disappointed

      0
      1. brucine Posted messages 25267 Registration date   Status Member Last intervention   4 187 > isa_2643 Posted messages 10 Status Member
         

        I nevertheless did the guinea pig thing and I provided you with the procedure: you must add your entries to a copy of the Hosts file, overwrite the original by copying this copy in its place, continue when the administrator rights are requested.

        Check by opening this file with Notepad that the new entries are indeed there; if they aren’t there, it means you must use a real administrator account: if the current account is only a user, restart another administrator session and start over.

        Clear the DNS cache to revoke the previous permissions if you connected to the "guilty" sites during the same session: and that’s it, it works...

        If instead of showing you an error message Google redirects you to Instagram or something unrelated, the Hosts file isn’t the issue either: it’s a browser home page or a more or less benevolent script (dubious extension, virus…) that automatically redirects Google to that page.

        0
      2. isa_2643 Posted messages 10 Status Member 1 > brucine Posted messages 25267 Registration date   Status Member Last intervention  
         

        so I did the procedure from the start again, I managed to clear the cache, beforehand I had cleared my internet history, and restarted my PC, but it still doesn’t work...

        0
      3. brucine Posted messages 25267 Registration date   Status Member Last intervention   4 187 > isa_2643 Posted messages 10 Status Member
         

        I don’t see what more I can do.

        You didn’t give me any feedback on whether your modifications have been saved in the Hosts file (and the correct one, in the right location, there are copies in various places under Windows).

        If that’s the case, and when you try to connect to a page it opens another one, then it’s no longer a Hosts file issue but malware.

        0
    2. brucine Posted messages 25267 Registration date   Status Member Last intervention   4 187
       

      Hello,

      Since localhost is "myself" and not routable, deciding that www.lebasdemondos.fr corresponds to 127.0.0.1 will cause anyone trying to connect to it to receive an error message: it is a way to block certain sites, as some security or anti-telemetry software do by adding to the Hosts file a list of forbidden sites.

      0
  4. kaneagle Posted messages 86298 Registration date   Status Moderator Last intervention   14 691
     

    Hello,

    Download this original hosts file --> LIBm60KQsBz_hosts.zip
    Unzip it
    Go to the folder of the unzipped file -> LIBm60KQsBz_hosts
    Copy the hosts file
    Go to -> C:\Windows\System32\drivers etc
    Paste the file into the folder -> etc
    Accept the replacement.


    0
    1. isa_2643 Posted messages 10 Status Member 1
       

      hello, that's very kind, but I already have this file.

      0
    2. brucine Posted messages 25267 Registration date   Status Member Last intervention   4 187
       
      Hello, What difference will that make? It’s an original, unmodified Hosts file, so not what we want.
      0
  5. isa_2643 Posted messages 10 Status Member 1
     

    # 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

    127.0.0.1    www.instagram.com
    127.0.0.1    www.tiktok.com

    celui la est le dernier fichier mis a jour en tant qu'adm. dans windows. si ya d'autres fichiers caches ou sont ils ?

    0
    1. brucine Posted messages 25267 Registration date   Status Member Last intervention   4 187
       

      More than the content, I asked you for the location of the file you modified; I have another one here, for example, and I can tinker with it however I want and it won’t change anything:
      C:\Windows\WinSxS\amd64_microsoft-windows-w..ucture-other-minwin_31bf3856ad364e35_10.0.19041.1_none_eb30aafa046f78ad

      0
  6. isa_2643 Posted messages 10 Status Member 1
     

    l'emplacement c : \ windows \ system32 \ driver \ etc

    "C:\Windows\System32\drivers\etc\HOSTS.txt"
    "C:\Windows\System32\drivers\etc\lmhosts.sam"
    "C:\Windows\System32\drivers\etc\networks"
    "C:\Windows\System32\drivers\etc\protocol"
    "C:\Windows\System32\drivers\etc\services"
    "C:\Windows\System32\drivers\etc\HOSTS"
    "C:\Windows\System32\drivers\etc\HOSTS.bak"

    0
    1. brucine Posted messages 25267 Registration date   Status Member Last intervention   4 187
       

      "C:\Windows\System32\drivers\etc\HOSTS"
      "C:\Windows\System32\drivers\etc\HOSTS.bak"

      The first of the two, the second is a backup that has no reason to exist and may be at the origin of the problem, delete it, or you have a real-time restore option on your PC that restores all changes to system files modified to their original state for security reasons.

      And NOT in text format, the first one too may be the issue: there is no extension, we open with Notepad and save as is, still WITHOUT extension, and DO NOT save as.

      0
  7. isa_2643 Posted messages 10 Status Member 1
     

    "C:\Windows\System32\drivers\etc\HOSTS" : this file is the base file...

    so I need to save it in .txt format like this: "C:\Windows\System32\drivers\etc\HOSTS.txt".

    I deleted the file "C:\Windows\System32\drivers\etc\HOSTS.bak".

    0
    1. brucine Posted messages 25267 Registration date   Status Member Last intervention   4 187
       

      NO!

      Without extension: Hosts, not Hosts.txt

      0