Trying to ban a website by adding it to a special text file..

tepeco

Posts: 66   +1
I have somehow lost my shortcut to a text file that is somewhere within the MS system or perhaps within the FIREFOX browser system. You add the address of the website to the list, give it a unique IP address from the others in the list and it keeps that website from coming up when someone tries to get to it.

What is the name of that file and where can it be found???

I hope this is enough information and that someone knows what I'm talking about.
 
Hosts File

@tepeco, I think you are looking for the "Hosts" file, which, in a Windows installation, can be found here: C:\Windows\System32\Drivers\etc. The file itself has no extension.

By-the-way, etc is the actual name of a folder.

Hope this helps.
 
Thank you! That is exactly what I was looking for.
And I won't loose it again as I've added the information to my password book.
 
btw:

The format is
Code:
ipaddress <space character> domain.name
and that file works TWO ways

a) add the real IP address and you avoid the access to the DNS

b) use 127.0.0.1 AS the ip address for Domain.name and
all references to Domain.name will be blocked.
 
@jobeard :
-- Assuming one uses DNS caching, does adding real IP address speed up browsing? Significantly? What other benefits, if any?
not a good idea. If the site in question goes down, you're stuck attempting a bougs address when the real system would have used the DNS to find another location.

btw: the host file is loaded into the local DNS Client - - which is why this works :)
every time you modify the etc\hosts file, you must
  • ipconfig /flushdns
  • net stop "dns client"
  • net start "dns client"
the quotes must be used

-- Can you alter Hosts file to permit access to, for example, www.domain.name, but restrict access to www.domain.name/anything_else ?
NO. the host file knows nothing of URLs. It contains IP addresses -> Domain.Names
 
it demonstrates HOW the name resolution works. On day-1 of TCP, this was THE resolution technique. Clearly it was limited and quickly lead to the development of DNS.

Another use is on your personal LAN: if all systems can use MAC mapping to hand out IP addresses, (woking just like static but the admin is from the router),
THEN you can give names to the systems, eg:
  • 192.168.1.2 Huey
  • 192.168.1.3 Dewey
  • 192.168.1.4 Louie
and you can get to the like \\Huey\sharedName
 
Got ya! :grinthumb I'm going to give that scheme a go on my home network.

What? I've got the whole day to ask you how to fix it!

Thanks again.
 
Back