How to block webpages and domain using the hosts file
Talk0
1,771pages on
this wiki
this wiki
Redirected from Howto block webpages and domain using the hosts file
You can use your computers hosts file to block any data being sent to or from your computer, for any domain. This is done by the operating system, and will block data on any browser of other program.
Contents |
Location of hosts file
Edit
Unix/Linux/BSD
Edit
- /etc/hosts
Windows
Edit
- Windows 95/98/Me
- c:\windows\hosts
- Windows NT/2000/XP Pro
- c:\winnt\system32\drivers\etc\hosts
- Windows XP Home
- c:\windows\system32\drivers\etc\hosts
Editing the file
Edit
You shouldn't need to remove anything from the file so if you don't know what you are doing don't remove or change any of the line. Simply add the new lines below.
- Make sure 127.0.0.1 localhost is the first line on the file.
- Its OK to have blank lines of commented lines before it. Comments are indicated by a '#'
- Your localhost line maybe more complex, and thats OK, as long as it has 127.0.0.1 and localhost on the same line
- Example: 127.0.0.1 PDP-8.homeland PDP-8 localhost
- You can add any domains you wish to filter by adding a line in the following format. You can add as many lines as you wish
- 127.0.0.1 domain
- Example: 127.0.0.1 ads.spyware.com
Example hosts file
Edit
# Local 127.0.0.1 PDP-8.homeland PDP-8 localhost # My filters 127.0.0.1 www.google-analytics.com
See Also
Edit
References
Edit
Advertisement | Your ad here
Photos
2,545photos on this wiki
-
by Lee Speigel
-
by Laserblue
-
by AweAndTri1337
-
by AweAndTri1337
Posted in User:AweAndTri1337, more... -
by AweAndTri1337
Posted in How to add Facebook Emoticons to Facebook Chat, more... -
by VittoriaVictoria
-
by VittoriaVictoria
-
by Laserblue
-
by Laserblue
-
by Laserblue
-
by Laserblue
- See all photos
Recent Wiki Activity
-
How to Act During A Conference Call?
edited by Justinkemp 1 day ago -
How to watch Netflix (Watch Instantly) in Linux
edited by ZyMOS 1 day ago -
Guide Plant Breeding Technician IT/Company goals
edited by Laserblue 5 days ago -
Guide Plant Breeding Technician IT/Working with Maize
edited by Laserblue 5 days ago