Block or Redirect Excessive Sites Using HOSTS File

The hosts file is amongst the intriguing and feature that is useful of Windows and Linux systems that prov >hosts file to block irritating adverts, pop-ups, banners, porn web web sites, and on occasion even redirect one internet site to a different.

On this page I shall explain to you how to mess around with all the hosts file to achieve a few of the above jobs that are mentioned.

What exactly is a hosts File?

The hosts file is like some other computer file which is used because of the operating-system to map hostnames and names that are domain for their matching IP addresses.

This means, whenever you type “google.com” in your browser’s target club, your pc will look for the hosts file to see you typed (google.com) if it includes the matching internet protocol address for the website name. Just in case if no entry is contained in the hosts file, the demand will be handed down to your DNS (Domain Name System) server to get the ip.

hosts File vs. DNS

In terms of resolving the hostnames, the hosts file is offered the very first priority over the Domain Name System. Generally in most situations, the hosts file remains unconfigured regarding the os and thus the DNS can be used because of the computer to solve the names of domain for their matching internet protocol address addresses.

Nonetheless, if the hosts file is available to include a valid entry for the provided hostname or domain title, then this will be acquired and employed by the operating-system.

Where could be the hosts File Located?

Windows: in case there is the Windows operating-system, the hosts file is situated at:

This should be in most cases

Unix/Linux: in case there is Linux it really is positioned at:

Simple tips to Block a site?

All you have to do is just add a new entry for that site in the hosts file to block a specific website. I might like to backup the initial file and produce a fresh one as opposed to changing it. Therefore, if one thing goes incorrect, you’ll simply delete it and restore the initial one! Well, listed here is a step by step procedure on how best to produce a brand new hosts file on Windows:

Go to “My Computer” and you need to start to see the “Menu bar” on the top. In case there is Vista and Profit 7, just click “Alt” to unhide the “Menu bar”.

Now into the menu club, simply simply click on “Tools -> Folder Options”. When you look at the “View” tab uncheck the option that claims: “Hide extensions for understood file kinds” and then click on “OK”.

Start a text that is new (New Text Document.txt) and rename it to: hosts. You’re going to get a caution. Simply click on “Yes”.

Start the hosts file making use of the notepad. Now why don’t we assume that you would like to block web sites Facebook and Youtube on your pc. With this all you’ve got to accomplish is add the lines that are following your hosts file:

Each entry should always be positioned on a specific line. The internet protocol address and the hostname must be divided by an area or perhaps a tab. In this means, you can easily block any offered web site just by pointing it to your internet protocol address 127.0.0.1.

Navigate to %systemrootper cent -> system32 -> drivers -> etc. Here you ought to look at hosts that are original, rename it to https://weeblywebsitebuilder.com/ hosts_bak. Just duplicate and paste the brand new hosts file that you have got produced. That’s it. You’ve now effectively blocked those web sites from loading on your desktop.

Just how to Redirect a web site?

Suppose you intend to redirect Friendster.com to Bing.com, what you need to complete is merely include the lines that are following your hosts file:

Right Here 74.125.236.72 may be the ip of Bing.com. To get the IP address out of every offered internet site, simply head to command prompt and ping it. As an example: ping.com this is certainly google. You need to get a response that is ping shows the internet protocol address as shown below:

To any extent further, when you type “friendster.com” On your browser, you shall be redirected to “google.com”.

How exactly does a hosts File work?

Once you block a web site with the hosts file, you aim it to your internet protocol address 127.0.0.1 which in reality may be the internet protocol address of your personal computer. The IP 127.0.0.1 points to your own computer and doesn’t exist outside in other words.

Therefore, if you type the Address of a webpage which is why an entry is present in the hosts file, your personal computer shall load the internet protocol address as 127.0.0.1 as opposed to the real one and attempts to establish an association with this particular internet protocol address (127.0.0.1) but fails. The website doesn’t load at all as a result.

The redirection associated with web site works by pointing the website name of 1 site to your internet protocol address of some other site (as configured by the hosts file) in the place of its original internet protocol target target. Therefore, when you kind friendster.com, it really is pointed to Google.com’s Internet protocol address and so, the Bing web page lots up as opposed to the real web page from friendster.com.

Just how to Block the Annoying Ads?

I’ve found a great means to fix keep all of the aggravating adverts, ads, pop-ups along with other parasites from increasing making use of a pre-configured hosts called MVPS hosts file. This hosts file includes a list that is long of to block dozens of irritating advertisements and pop-ups that always load while you’re searching the net. You can even get updates that are regular this to remain up-to-date. You can easily install MVPS hosts file through the website link below:

If you’re experimenting with all the hosts file and one goes incorrect, simply delete the hosts file it self and rename the original file from hosts_bak to hosts. This should restore everything on track. I really hope this post on hosts file will allow you to block undesired sites on your pc.

LEAVE A REPLY

Please enter your comment!
Please enter your name here