We all access internet in a never ending loop and in this loop what we find most annoying is the ads that we come across .We often deploy our best fighters in the name of some extensions or addons to fight the cause. But what you dont know is that ads are just a dot of the bigger picture. Ads cant harm you directly unless you are dumb enough to click each and every adware that you come across.
What can actually cause real harm is the malware with which the internet is filled and the trackers that follow you everywhere.
So, how to get away from these malware and trackers without using any extensions or add-ons?
The answer is HOSTS files. Now you must be wondering what this host file is, never heard of this genius. Well you are not alone but i am here to guide you through it.
What is HOSTS file?
What you see above is what a HOSTS file look like.
When you try to access a previously unknown website on the internet, your web browser normally first checks the HOSTS file to see if the URL have entered such as www.google.com or www.facebook.com has a corresponding IP address mapped to it before accessing the Domain Name System.
For example the IP address of www.facebook.com is 157.240.16.35 and the IP address of www.google.com is 172.217.166.174. Let's say we wished to point www.google.com to www.facebook.com. We would add the following line to the HOSTS file.
172.217.166.174 www.facebook.com
Now whenever you click a link to www.google.com or enter it manually in the address bar of your browser it will take you to www.facebook.com based on the IP address of Facebook being mapped to the hostname of Google in your HOSTS file.
Windows 7 & Higher: C:\Windows\System32\drivers\etc
Windows 2000: C:\WINNT\SYSTEM32\DRIVERS\ETC
Windows XP, 2003: C:\WINDOWS\SYSTEM32\DRIVERS\ETC
Note: Using a HOSTS file will not prevent ads that are served from the same Website you are viewing and also it will not work with URL's that begin with IP numbers.
For example, an entry might be:
127.0.0.1 www.should-not-be-seen.com
Any request by your browser for the above hostname just gets sent right back to your own computer. Instead of ad-images you may just get a red x with a little bit of text or "The page cannot be displayed" message where the ad would normally appear or if it is an out and out malware site your browser will just show the "The page cannot be displayed" message.
http://winhelp2002.mvps.org/hosts.htm
http://pgl.yoyo.org/adservers/index.php
https://www.hosts-file.net/?s=Download
After you have downloaded the HOSTS file , extract it to the following location :
C:\Windows\System32\drivers\etc
Now just click Yes to confirm the replacement of the original HOSTS file that came with your Windows installation with the one you have downloaded.
Tada, now you are all set to surf the internet faster and adfree. Just check for updates every 15 days so that you have the latest layer of protection.
For example the IP address of www.facebook.com is 157.240.16.35 and the IP address of www.google.com is 172.217.166.174. Let's say we wished to point www.google.com to www.facebook.com. We would add the following line to the HOSTS file.
172.217.166.174 www.facebook.com
Now whenever you click a link to www.google.com or enter it manually in the address bar of your browser it will take you to www.facebook.com based on the IP address of Facebook being mapped to the hostname of Google in your HOSTS file.
Where is the HOSTS file ?
Windows 7 & Higher: C:\Windows\System32\drivers\etc
Windows 2000: C:\WINNT\SYSTEM32\DRIVERS\ETC
Windows XP, 2003: C:\WINDOWS\SYSTEM32\DRIVERS\ETC
How will a HOSTS file will protect you ?
A custom made HOSTS file containing thousands of dubious URLs can be used to block all kinds of ads, Web bugs, cookies,etc., by stopping your computer from communicating with the ad servers. This way you may only block sites that serve unwanted content or any other site that you choose to block.Note: Using a HOSTS file will not prevent ads that are served from the same Website you are viewing and also it will not work with URL's that begin with IP numbers.
But how is this achieved?
By using the loopback IP address of your computer i.e,127.0.0.1 or 0.0.0.0 . "A loopback is a communications channel with only one endpoint. Any message transmitted through such address does not come from the original URL/server and typically the ads comes from URL's other than the one initially addressed ie., from a third party server. Often from the servers of large ad agencies whose business is providing various kinds of ads for the Websites. By putting a list of such URL's into the HOSTS file many ads can be blocked. In simple words , we will write 127.0.0.1 corresponding to all such malicious websites and thus they will be redirecting to this address which belongs to our own machine and thus the website would never get loaded and you will be surfing the web freely.For example, an entry might be:
127.0.0.1 www.should-not-be-seen.com
Any request by your browser for the above hostname just gets sent right back to your own computer. Instead of ad-images you may just get a red x with a little bit of text or "The page cannot be displayed" message where the ad would normally appear or if it is an out and out malware site your browser will just show the "The page cannot be displayed" message.
How to set this up?
You can download the HOSTS file from the following websites :http://winhelp2002.mvps.org/hosts.htm
http://pgl.yoyo.org/adservers/index.php
https://www.hosts-file.net/?s=Download
After you have downloaded the HOSTS file , extract it to the following location :
C:\Windows\System32\drivers\etc
Now just click Yes to confirm the replacement of the original HOSTS file that came with your Windows installation with the one you have downloaded.
Tada, now you are all set to surf the internet faster and adfree. Just check for updates every 15 days so that you have the latest layer of protection.
Comments
Post a Comment