Are you tired of all those adds that appear every now and then while you are surfing the internet?
Well, I had the same problem and I tried a lot of software to block websites but they were just trial versions, so once the trial version expired, the ads were happy again…
Now, I use a very easy way to block those annoying and sometimes even malicious websites! And it works!
If you are on Windows, all you need is to know the url addresses of the websites that always appear to you. (You can wait until they appear next time and copy their address from the address bar)
Then you will use the Windows magical HOSTS file.
For your version of Windows, the HOSTS file is located in
The hosts file allows you to manually enter IP addresses associated with websites, so the DNS server can quickly resolve an address.(If you don’t understand that, no worries)
So now you will make a trick: You will tell that DNS thingie that all the ad websites that you hate have the IP address 127.0.0.1.
If you don’t already know,127.0.0.1 is your local machine!
So say now you want to block annoying.com.
Your machine will try to open: 127.0.0.1/ad/index.html
Of course it will not find it on your computer, so it is blocked.
LONG LIVE HOSTS!
You can do that not only to ads that appear in a new browser window, but also ads that appear on websites you visit by just knowing where they come from.
The only disadvantage of using this way is that if ads usually appear in new windows, the new window still opens but it gives you a wrong address message. But this is far better than seeing an ad every now and then!
Now, let’s do it,
—first go find your hosts file from the path given above.
—open it with notepad (right click -> open with-> notepad )
—you will find the following line:
---underneath it copy and paste the same line, but change localhost to the address of the website you want to block eg
---Save and Close, and you're done!
From now on, you choose who visits you at home! :)
You can also use it to block certain website from your children or little brothers/sisters...
And they will never understand how you did it :)
Originally Posted By Laila Hussein to Thoughts & Tips at 12/23/2007 12:40:00 AM