There are many reasons why someone wants to block certain websites. Some of the websites are not safe for browsing and may infect your computers with viruses, and add a lot of pop-ups that slow down the performance of your computer and for the non-techie parents who have a computer at home and are worried about their kid’s safety for online websites or it can be useful for some companies to restrict the access to websites to keep their staff from wasting time. Let’s see how you can block websites on your pc without any software.

You can block the sites by making a small change to the Windows “hosts” file. It’s the easiest way to block a website. Now you may be wondering that what is the Hosts file and where is it placed in Windows 10? Don’t worry you will know about everything by the end of this article.

what is Hosts File?

A Hosts file is a plain text file in an operating system which is used to map hostnames to the IP addresses of the given website. Let me explain how it works.

For example, if you want to launch geekhubb.com [hostname]. Usually, the computer checks the Hosts file first to find corresponding IP address of the hostname.

If the search is successful, it uses the mapped IP address. If the search is not successful, it finds the IP address of the hostname by sending a query to the DNS(domain name system).

Here, we are going to map the hostname to your localhost IP address so that it cannot search for the actual IP address of the hostname this way browser cannot connect to the website hence it shows refused to connect. So this way hosts file can be used to block certain websites.

How to block websites on your pc without any software

Step 1: Open notepad or notepad++ with run as administrator.

Step 2: Now click on open with and go to the following location c drive->windows->system32->drivers->etc.  C:\Windows\System32\drivers\etc.

Step 3: Select host file and click on open.

how to block websites on your pc without any software

It looks likes the below screenshot.

how to block websites on your pc without any software

Step 4: Add this line 127.0.0.1 www.example.com in the Hosts file. Here example is the name of the website which you want to block. For example, if you want to block Netflix all you should do is add like this: 127.0.0.1 www.Netflix.com. If you want to block more websites then add more new lines like that.

how to block websites on your pc without any software

Step 5: Click File, Save to commit your changes. Dismiss any warnings which may be triggered by your editing of the Hosts file.

Step 6: Close the browser windows(if open), and then reopen a browser to test your edits. The blocked sites should not display in any browser.

how to block websites on your pc without any software

 

 

 

 

 

How to unblock them?

Simply remove the websites which you want to unblock and save the file.

Tip: If your school or college had blocked some of the websites then check whether they have blocked by this method or not if yes then you can unblock them easily but mostly they won’t go for this method.

previous post

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.