Let’s keep this brief! You want to know how to block a website. This might be for you, your kids or just to block a dodgy website.
You can also read this on Medium.
Latest Posts
Microsoft Clarity – The Definitive Guide
I know I’m late to discovering this tool, but for anyone else out that that…
PowerShell Where-Object | Super Easy Object Filtering
Morning everyone! I wanted to revisit a root topic of mine: Windows PowerShell! If you…
Best Plugins For WordPress
If you’ve ever setup a WordPress website before, you’ll have probably seen the dizzying amount…
How To Turn Off iPhone 15
You might think you’re being dumb but trust me, I had to Google how to…
When Does The iPhone 16 Come Out?
Apple’s new iPhone, the iPhone 16, has just been released! Let’s go through everything you…
Blurry Dotted Background in Elementor
Been a while! Let’s kick things back into gear by showing you how I created…
Introduction
But as a TL:DR – This article is only useful is you are using Windows.
How To Block A Website On Windows
Personally, this would be my favourite method as it has a number of advantages:
- Scope – Blocking a site for your entire operating system means that the website will be unavailable for any web browser you use. Whereas blocking a site in a particular web browser would still allow other browsers and services on your machine to access the website. To set a block up for your entire network, consider using PiHole
- Ease – If you know your way around a computer, then I think it’s the easiest option as it’s simply a case of updating a single notepad
- Speed – Rather than downloading a separate program or extension, you simply set the values and save the file. So fast!
However, there are some downsides. For example: you will need to have administrator access to the machine in order to update and save the file. You might also find this method a bit too advanced if this is your first day using a computer; but how likely is that?
Enough setup, let me show you how to block websites on Windows:
Step 1
Search for notepad and right click the program, from the options displayed make sure to choose Run as administrator:
Step 2
One Notepad is open as the administrator, you need to go to File -> Open and then open the file in this location:
C:\Windows\System32\drivers\etc\hosts
It’s worth noting here that the hosts file might not show up due to the file type filtering. If this is the case, please select All Files (*) instead of Text Documents (*.txt)
Step 3
Finally, you can enter the websites you want to block. The values can be as specific as you want. But the overall goal is to send traffic destined for https://facebook.com to 127.0.0.1 which is the local linkback address. Effectively meaning the request for Facebook goes nowhere.
I’ll leave below some examples that you can add to your hosts file:
Once you’ve setup your hosts file, you can use File -> Save.
And that’s it, you should have now blocked access to whatever sites you want to the entire machine.
I hope you learnt something whilst reading this!
Enjoy! 🎉