Block any website on your pc | GETLearners

Are you thinking to block any website on your pc that is dangerous for your personal data? Don’t worry! No one is going to harm your data because there are many ways that you can block any website on your pc.

There are hundreds of reasons you might want to block certain websites on your Windows computer. Some websites could be spreading viruses, contain explicit content or trying to steal your personal information saved in your pc like passwords or banking details, and you want to stop those suspected websites and you might not appreciate if someone’s from your family might open those suspicious websites from your system too.

In this article, we will discuss one way to block any website on your pc that’s called changing hosts file in windows.


Several options are available for blocking a website. for instance

  • Block a website using Family Safety.
  • Blocking a website on a router.
  • Blocking a website using the software.
  • Blocking a website using the browser, for example, Google, IE, etc.
  • Blocking a website in Windows

we are going to learn the last one how to block using windows method.
Change hosts file
The first thing to need to do is to open notepad and remember to open it as a system administrator and you must have administrator rights to do this.

Notepad-Block any website on your pc

Now click > Edit > Open
After doing this Go to your C drive

Now click on windows

windows-Block any website on your pc

Go to system 32


now click on drivers


when you click on drivers then find > etc


when you click etc sometimes you get nothing there will be no file but at bottom right, you will find the option

Click on hosts..

hosts-Block any website on your pc

then click on hosts file you will see the screen like this


host file

Then type ( type the name of the website you want to clock like

block website-

Then save the notepad file. using this method you can block as much websites as you want. and in future, if you want to unblock simply remove the edit property and save.

Remember: you can only block the website if you have administrator rights.

For more details write us in the comment section or read related articles at GETLearners

Hi, This is Nouman Kaleem im the author of this website and I made this website for educational purposes.

Leave a Comment