Just Say Search

  /  Best Website Builder   /  Block or Redirect Excessive Sites Using HOSTS File

Block or Redirect Excessive Sites Using HOSTS File

Block or Redirect Excessive Sites Using HOSTS File

The hosts file is just one of the intriguing and useful function of both Windows and Linux systems that prov >hosts file to block irritating ads, pop-ups, ads, porn sites, and sometimes even redirect one web site to a different.

On this page I will explain to you simple tips 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 os to map hostnames and names that are domain with their matching internet protocol address details.

To phrase it differently, once you type “google.com” on your own browser’s address club, your personal computer will appear for the hosts file to see if it has the corresponding internet protocol address for the domain title you typed (google.com). Just in case if no entry is contained in the hosts file, the demand will be handed down into the DNS (Domain Name System) server to search for the internet protocol address.

hosts File vs. DNS

With regards to resolving the hostnames, the hosts file is provided the priority that is first the Domain Name System. Generally in most situations, the hosts file remains unconfigured from the os and thus the DNS can be used by the computer to solve the names of domain for their corresponding internet protocol address addresses.

Nevertheless, if the hosts file is located to include a legitimate entry for the offered hostname or domain title, then that is found and utilized by the operating-system.

Where may be the hosts File Located?

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

In many cases this would be:

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

Just how to Block a web page?

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 in the place of changing it. So, if one thing goes incorrect, you’ll simply delete it and restore the initial one! Well, let me reveal a step-by-step procedure on how best to develop a brand new hosts file on Windows:

Go to “My Computer” and you really need to begin to see the “Menu bar” at the top. In the event of Vista and Win 7, just click “Alt” to unhide the “Menu bar”.

Now into the menu club, click on “Tools -> Folder Options”. Within 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 are getting a warning. Simply click on “Yes”.

Start the hosts file utilizing the notepad. Now why don’t we assume that you would like to block the websites Facebook and Youtube on your pc. With this all you have to accomplish is add the lines that are following your hosts file:

Each entry must certanly be added to a individual line. The internet protocol address and a space should separate the hostname or even a websitebuilder.com tab. In this means, you are able to block any offered web site by simply pointing it into the internet protocol address 127.0.0.1.

Navigate to %systemrootper cent -> system32 -> drivers -> etc. Here you need to start to see the hosts that are original, rename it to hosts_bak. Just duplicate and paste the brand new hosts file that you have got developed. That’s it. You’ve now effectively blocked those internet sites from loading on your desktop.

Just how to Redirect an online site?

Suppose you need to redirect Friendster.com to Bing.com, what you need to complete is simply include the after lines to your hosts file:

right Here 74.125.236.72 could be the ip of Bing.com. To locate out of the internet protocol address of every given website, just head to command prompt and ping it. As an example: ping google.com. You ought 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 own web browser, you certainly will be rerouted to “google.com”.

How can a hosts File work?

You point it to the IP address 127.0.0.1 which in fact is the IP address of your own computer whenever you block a website using the hosts file. 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 web site which is why an entry is contained in the hosts file, your pc will load the internet protocol address as 127.0.0.1 rather than the actual one and attempts to establish an association using this ip (127.0.0.1) but fails. The website doesn’t load at all as a result.

The redirection for the internet site works by pointing the domain name of 1 site to your internet protocol address of some other web site (as configured by the hosts file) rather than its IP that is original address. So, when you kind friendster.com, it really is pointed to Google.com’s Internet protocol address and so, the Bing web web page lots up instead of the page that is actual friendster.com.

How to Block the Annoying Ads?

I’ve discovered a great means to fix keep most of the irritating adverts, ads, pop-ups along with other parasites from increasing simply by using a pre-configured hosts called MVPS hosts file. This hosts file has a long variety of entries to block dozens of irritating adverts and pop-ups that always load while you’re searching the world-wide-web. You could get regular updates on this to remain up-to-date. You can easily install MVPS hosts file through the website website link below:

If you’re experimenting using 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 can help you block websites that are unwanted your personal computer.