Host file isn’t working
Solvedisa_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
-
-
Hello,
there must be a tab between the IP and the domain.-
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.
-
-
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?
-
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.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.
-
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.
-
-
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.
-
# 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 localhost127.0.0.1 www.instagram.com
127.0.0.1 www.tiktok.comcelui la est le dernier fichier mis a jour en tant qu'adm. dans windows. si ya d'autres fichiers caches ou sont ils ?
-
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
-
-
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"-
"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.
-
-
"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".