Skip to main content

An easy but powerful way to block ads, banners, adware, spware, tracking pages

You don't always need an expensive piece of software to do complex things. Why to install a 10 Mb software just to block ads that are served from Yahoo servers ? Or to prevent pop-up that always irrate you while you are surfing ?

The magic in hidden in a small file called "HOSTS" which resides in your Windows System folder (Some installations of Windows may use different names for the Windows folder. Substitute the name of your Windows folder for either Windows or Winnt.)



Win 98\ME = C:\WINDOWS

The Hosts file is more like an phone book - it maps the IP addresses to host names. When Windows starts, this particular file is loaded in memory and any query to DNS server is first routed through the Hosts file. This provides you with the flexibility to override addresses in the DNS by redirecting any connection attempts back to the local machine, commonly referred as

For instance, the host name for Yahoo! is, while its IP address is Either address will take you to Yahoo!'s site, but the www address will first have to be translated into the IP address. If you type in the IP address directly, your computer will not have to look it up.

The entries above blocks all objects (like images, streaming audio, video, text content) from the servers and these sites can't even track your movements.

It also enables quick loading of websites as you computer doesn't need to query external DNS servers for the address translation.

This mechanism also blocks the "phone home" feature. If you think that some bad software (adware or spyware) is trying to connect to the author's site in the background, just put an entry for that website in your HOSTS file and all access from your system to that website would be blocked.

If all this is sounding too complicated, just download a freeware HostsMan that lets you manage your Hosts file. The folks at have provided a ready-to-use HOSTS file (202 kb) which blocks most of the bad sites. And they do update it regularly. The last update was just a week back.

Some hijackers may try to playaround with your hosts file by blocking access to all virus scanning / security related sites like mcafee, norton so don't forget to set your host file as read-only once you are done editing it.