???????? ?????? ????? ??????????? ????????

???????? ?????
Post Reply
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

???????? ?????? ????? ??????????? ????????

Post by Rksk » Wed Sep 28, 2011 9:55 pm

Block Google, MSN (Windows Live) and Yahoo Ads using Hosts File

Are you irritated by the numerous ads 'served' to you while you are browsing the web. If you do, here is one way you can save yourself from all that 'stress'. All you have to do to block ads, banners or cookies is by 'tweaking' windows hosts file.

For those of you who do not know what a hosts file is, here is a short background information:

"The Windows Hosts file contains the mappings of IP addresses to host names. This file is loaded into memory (cache) at startup, then Windows checks the Hosts file before it queries any DNS servers, which enables it to override addresses in the DNS. This prevents access to the listed sites by redirecting any connection attempts back to the local machine. Another feature of the HOSTS file is its ability to block other applications from connecting to the Internet, providing the entry exists.

When a web site or application calls up an advert it normally uses a standard URL like http://www.anADVERTsite.com which like any URL typed into a web browser must be translated into a machine recognised numerical identifier (IP address) which is a unique identifier of a location on the internet."

Explanation of why 'editing' the hosts file works in blocking ads:

By editing the hosts file, the HTML or Java-Script used to call the ads would be unable to reach these ads servers or engines, which are mainly used to serve the ads to you. .

Alright, let us begin editing the hosts file of your system.

First of all, we navigate to the folder containing the hosts file.

Location of Windows Hosts file:

Windows 95/98/Me
C:\Windows\hosts

Windows NT/2000/
C:\Winnt\System32\drivers\etc\hosts

Windows XP Home/XP Pro /Vista
C:\Windows\System32\drivers\etc\hosts

(Note that you may need administrator access for Windows NT/2000/XP/Vista)

Locate the hosts file, and right click on it. Select Open.When prompted with "Open With" dialog box to choose a program you want to use to open this file, select any one of these:

Notepad
Wordpad
Any other text editor.

Block Google Ads

Add the following lines to your windows host file and block Google from serving ads on your computer. It also helps to cover your track when visiting sites that use Google Analytics.

127.0.0.1 pagead.googlesyndication.com
127.0.0.1 pagead2.googlesyndication.com
127.0.0.1 adservices.google.com
127.0.0.1 ssl.google-analytics.com
127.0.0.1 http://www.google-analytics.com
127.0.0.1 imageads.googleadservices.com
127.0.0.1 imageads1.googleadservices.com
127.0.0.1 imageads2.googleadservices.com
127.0.0.1 imageads3.googleadservices.com
127.0.0.1 imageads4.googleadservices.com
127.0.0.1 imageads5.googleadservices.com
127.0.0.1 imageads6.googleadservices.com
127.0.0.1 imageads7.googleadservices.com
127.0.0.1 imageads8.googleadservices.com
127.0.0.1 imageads9.googleadservices.com
127.0.0.1 partner.googleadservices.com
127.0.0.1 http://www.googleadservices.com
127.0.0.1 apps5.oingo.com
127.0.0.1 http://www.appliedsemantics.com
127.0.0.1 service.urchin.com

Don't forget to save the 'edited' hosts file.

For those of us who are using Firefox, we can make use of two add-ons/extensions to block Google ads:

Google also serves ads (to be more precise, text ads) in an iFrame. Therefore, to block Google text ads, it is important to block iFrame coming from ad servers, and in this case, Google’s ad servers. We can do so by installing the Adblock Plus extension. After Adblock Plus is installed, go to the Tools > Extensions menu, highlight Adblock, and click the Options button. In the New Filter: input box, paste this: http://*.googlesyndication.com/*

P.S. Make sure that in the Adblock preferences window, it is set to Remove ads instead of Hide ads.

There is also another extension/add-on known as CustomizeGoogle which lets you block Google Analytics cookies. Using this feature makes you more anonymous. But your visit on a single webpage can still be logged. This way, both Google and the owner of the website knows that someone visited a webpage, but it's difficult to track all pages you're visiting.

Block MSN (Windows Live) Ads

Add the following lines to your windows host file and block Windows Live/Hotmail/MSN from serving ads on your computer.

127.0.0.1 view.atdmt.com
127.0.0.1 rad.live.com
127.0.0.1 rad.msn.com
127.0.0.1 live.rads.msn.com
127.0.0.1 ads1.msn.com

Don't forget to save the 'edited' hosts file.

Block Yahoo Ads

Add the following line to your windows host file and block Yahoo Messenger from serving ads on your computer.

127.0.0.1 insider.msg.yahoo.com

Don't forget to save the 'edited' hosts file.

Now, whenever you login to Gmail, Windows Live Mail, Ymail, you will no longer see ads.

Additional information:

If that isn't enough for you, you can block more ads by using an already 'tweaked' hosts file which has already added numerous entries/lines in order to block numerous 'sources' of advertisements. For example. you can download it from MVPS.org

http://www.mvps.org/winhelp2002/hosts.htm

Download the zip file from here and extract:

http://www.mvps.org/winhelp2002/hosts.zip

However, take note guys that in most cases a large HOSTS file (over 135 KB) tends to slow down the machine especially if you are using Windows 2000 and XP. To resolve this issue (manually) open the "Services Editor"

* Start | Run (type) "services.msc" (no quotes)
* Scroll down to "DNS Client", Right-click and select: Properties
* Click the drop-down arrow for "Startup type"
* Select: Manual, click Apply/OK and restart.

Sources:

http://labnol.blogspot.com/2004/10/twea ... -file.html
http://labnol.blogspot.com/2005/11/prev ... cking.html
http://labnol.blogspot.com/2007/05/secr ... moves.html
http://underscorebleach.net/jotsheet/20 ... e-text-ads
http://thenonhacker.deviantart.com/journal/18675053/

Update:

Oops, I forgot that changing the hosts file in Vista is a bit 'different' due to UAC. The 'problem' is if you try to modify your hosts file in Vista, it will not let you save it. It tells you that you don't have permission.

So here's how to successfully modify the hosts file:

1) Browse to Start -> All Programs -> Accessories
2) Right click "Notepad" and select "Run as administrator"
3) Click "Continue" on the UAC prompt
4) Click File -> Open
5) Browse to "C:\Windows\System32\Drivers\etc"
6) Change the file filter drop down box from "Text Documents (*.txt)" to "All Files (*.*)"
7) Select "hosts" and click "Open"
8) Make the needed changes and close Notepad. Save when prompted.

Source: http://geekswithblogs.net/thibbard/arch ... Vista.aspx
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

Re: ???????? ?????? ????? ??????????? ????????

Post by Nipuna » Thu Sep 29, 2011 9:08 am

Man use Adblocker plus that has for Firefox and Chrome :)

It's so easy than doing such long things. ;)
Post Reply

Return to “??????? ???? ?????”