How to Block a Website on Windows 10

In this post, we’ll see how to block a website on Windows 10 without any software. Let’s get started.


Open Notepad as Administrator (To do this: Open Run Command. In it, type notepad and then press Ctrl + Shift + Enter keys simultaneously. Hit “Yes” in the UAC popup).

Hit File > Open.

Go to this location in the popup: C:\Windows\system32\drives\etc.

Now, choose “All Files” from the drop-down list above the “Open” button, and you can see the “hosts” file. Double-click it.

Now, at the end of the file, in a new line, type the following: thewebsiteyouwanttoblock

Remember that you need to use the exact URL of the site. In this instance, I want to block Facebook. So, I need to enter

I hope you got the point. Now, do the same for all the websites you want to block.

Entered sites

After that, hit “File” and then hit the “Save.”

That’s it. All done.

To Unblock a Site:

Remove the line regarding the site


Comment the line by putting # at the front of it.

Also see:

Leave a Comment

Your email address will not be published. Required fields are marked *

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