Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Tech Tips & Tricks
Tag Cloud
access audio black screen blue screen boot bsod connection crash dell desktop driver drivers dvd email error excel firefox hard drive hardware hijackthis internet keyboard laptop malware monitor network networking outlook problem processor recovery registry cleaner router safe mode screen slow sound spyware trojan upgrade vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > General Technology > Tech Tips & Tricks >
Kick those ads without extra software : Windows Hosts file

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
cyberoidx's Avatar
Junior Member with 26 posts.
 
Join Date: Jan 2006
Location: Mumbai, India
Experience: Einstein
24-Apr-2006, 04:31 AM #1
Kick those ads without extra software : Windows Hosts file
The windows hosts file contains address of websites and ip address that need to be mapped on your network. If you map an internet address to 127.0.0.1 (your own computer) then you will never be able to reach a website.

Therefore if you put the address of internet adservers in your hosts file, webpages and programs will never be able to contact a certain website, and you wont get ads, making surfing faster.
********************************
How to do this?
Copy the text from here:

http://pgl.yoyo.org/adservers/server...ate%5Byear%5D=

or select hosts file format on this page:
http://pgl.yoyo.org/as/


and paste it in this file (open in notepad)
Windows XP = C:\WINDOWS\SYSTEM32\DRIVERS\ETC\hosts
Windows 2K = C:\WINNT\SYSTEM32\DRIVERS\ETC\hosts
Win 98/ME = C:\WINDOWS\hosts
Linux: /etc/hosts

after this, clear your cache, and reboot.
************************************
Notice the difference.

Note: You should update the file regularly if you use it.

Want to Read more?
http://en.wikipedia.org/wiki/Hosts_file
http://elouai.com/hosts-file.php
__________________
Good Applications to get to tune you computer:

StartupManagers (know and remove what starts with windows)
Startuplist
http://downloads.subratam.org/startuplist.zip
Autoruns
http://www.sysinternals.com/Utilities/Autoruns.html

Advance Processmonitors
Procexplorer
http://www.sysinternals.com/Utilitie...sExplorer.html

Spybot SD
http://www.spybot.info/

PageDefrag:
http://www.sysinternals.com/utilities/pagedefrag.html
coachdan32's Avatar
Computer Specs
Senior Member with 1,038 posts.
 
Join Date: Nov 2003
Location: Louisville, KY
28-Apr-2006, 03:37 PM #2
Does this really work?
knight_47's Avatar
Senior Member with 1,192 posts.
 
Join Date: Mar 2006
Location: →
Experience: Um... Green?!
28-Apr-2006, 06:50 PM #3
Um, good question. I've used this before, many times, and it does work. But I've never done it the way cyber has explained it. What I do is first get the IP of the site. You can do this by clicking start > run > and type in cmd > then type in ping www.website.com. Once you have your IP, go into your hosts file, you should see something like this:

127.0.0.1 localhost

paste the IP where the ip goes, and type in the full url under local host. So it should look like this:

127.0.0.1 localhost
111.11.111.111 www.website.com

*Note that if the IP of the site changes, (if they change servers, etc) then the IP also changes, and it needs to be changed in your hosts, or removed completely.

Also, if you have MS antispyware, or anything similar, it might warn you that your hosts is being changed, just allow it.

Now to block and add, type in 127.0.0.1 right before the url so it should look like this.

127.0.0.1 localhost
111.11.111.111 http://www.website.com
127.0.0.1 http://www.ads.com

But first you need the URL of the ad, to do that, you can either right click on it with firefox, and go to properties. With IE, do the same.

You can even block whole websites with this. All you do is just put in a false IP, or an IP that doesn't exist, (random numbers that resemble an IP address) and then put in the URL of the site, but make sure you put in the HTTP://, and then another line without HTTP://

Every enter, whether your blocking an ad, a site, or making a site load faster, needs a new enter. Like this:


127.0.0.1 localhost
111.11.111.111 http://www.website.com
127.0.0.1 http://www.ads.com
ip site
ip2 site.com
ip3 www.site.com

etc..
__________________
(ಠ_ಠ)
my site
coachdan32's Avatar
Computer Specs
Senior Member with 1,038 posts.
 
Join Date: Nov 2003
Location: Louisville, KY
28-Apr-2006, 10:09 PM #4
Not sure I followed, has anybody tried the file that was posted as it is? Or have any other comments on this method?
-MaDcOw-'s Avatar
Distinguished Member with 2,165 posts.
 
Join Date: Aug 2005
Location: New Zealand
Experience: Intermediate
28-Apr-2006, 10:30 PM #5
StumpedTechy's Avatar
Computer Specs
Distinguished Member with 7,198 posts.
 
Join Date: Jul 2004
Location: Central Florida
Experience: Advanced
05-May-2006, 03:34 PM #6
Yeah it works fine I have a hosts file that is now over 1 meg in size due to all the entries you can use either 0.0.0.0 or 127.0.0.1 as viable blocks for the I.E. not to point to where its trying to.

All the hosts file is doing is trying to resolve an IP from a DNS first before the DNS service gets used. Essentially your just "breaking" your browser for that specified URL.
JohnWill's Avatar
Computer Specs
Moderator with 96,726 posts.
 
Join Date: Oct 2002
Location: South Eastern PA, USA
Experience: Advanced age & experience
05-May-2006, 08:18 PM #7
I don't know if this still applies, but it used to be that 0.0.0.0 was a better address, since it didn't even try to connect. 127.0.0.1 will sometimes waste some time trying to connect. I haven't tried either lately, something to experiment with.
__________________
Remember: Data you don't have at least two copies of is data you don't care about.

Microsoft MVP - User Desktop Experience
-MaDcOw-'s Avatar
Distinguished Member with 2,165 posts.
 
Join Date: Aug 2005
Location: New Zealand
Experience: Intermediate
05-May-2006, 10:53 PM #8
Quote:
Originally Posted by JohnWill
I don't know if this still applies, but it used to be that 0.0.0.0 was a better address, since it didn't even try to connect. 127.0.0.1 will sometimes waste some time trying to connect. I haven't tried either lately, something to experiment with.
Let us know if you do experiment and how it went.
hewee's Avatar
Distinguished Member with 54,749 posts.
 
Join Date: Oct 2001
Location: *Random People Pleaser***Sacra
Experience: Having fun
06-May-2006, 01:43 AM #9
Yea let use know if 0.0.0.0 is better.
My hosts file right now is 1.33 MB
JohnWill's Avatar
Computer Specs
Moderator with 96,726 posts.
 
Join Date: Oct 2002
Location: South Eastern PA, USA
Experience: Advanced age & experience
06-May-2006, 11:29 AM #10
I don't use a HOSTS file for this purpose, so you'll have to do your own experiments.
hewee's Avatar
Distinguished Member with 54,749 posts.
 
Join Date: Oct 2001
Location: *Random People Pleaser***Sacra
Experience: Having fun
06-May-2006, 03:52 PM #11
What are own experiments?

Now to find a easy way to change all the 127.0.0.1 over to 0.0.0.0.
Don't use a hosts manager because most will not see all of the host file because it is too big.
I know some will change things from 127.0.0.1 over to 0.0.0.0 so guess I could break my hosts file down smaller and then covert each smaller one over and then put them all back together.
Got about 45,000 sites I am blocking.
JohnWill's Avatar
Computer Specs
Moderator with 96,726 posts.
 
Join Date: Oct 2002
Location: South Eastern PA, USA
Experience: Advanced age & experience
06-May-2006, 03:52 PM #12
Well, a simple text editor will change them all in one shot.
hewee's Avatar
Distinguished Member with 54,749 posts.
 
Join Date: Oct 2001
Location: *Random People Pleaser***Sacra
Experience: Having fun
06-May-2006, 04:04 PM #13
I got Hostsman and it will do it too.
JohnWill's Avatar
Computer Specs
Moderator with 96,726 posts.
 
Join Date: Oct 2002
Location: South Eastern PA, USA
Experience: Advanced age & experience
06-May-2006, 08:32 PM #14
You were the one that asked for an easy way, not me.
-MaDcOw-'s Avatar
Distinguished Member with 2,165 posts.
 
Join Date: Aug 2005
Location: New Zealand
Experience: Intermediate
06-May-2006, 08:59 PM #15
I guess it would take the size of the hosts file down, less characters and all.
Closed Thread Bookmark and Share

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 12:32 PM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.