With this trick, block any website for free!
Follow this tutorial to prevent access to certain websites on your computer
With this tutorial, learn how to block access to websites on your computer.
Photo Ekaterina Bolovtsova in Pexels
Blocking a website on your PC or Mac does not require the use of any third party software.
The method we propose in the rest of this tutorial is simple and free. In Windows, it even allows you to prevent access to certain Internet pages depending on a user or a time of day.
Blocking a website on the PC
To block a website on your PC, simply check your Windows HOSTS file. Then we have put together the steps to follow:
- Open File Explorer and go to Windows C: → Windows → System32 → drivers → etc.
- Right-click on Host →. Open with Notepad →.
If the hosts file is opened through another program, go to Start → All Programs → Notepad Accessories, then click File → Open → hosts.
- Once in the Notepad, place the mouse cursor at the end of the last line and press Enter.
- Type 127.0.0.0.1, make a space, then type the address of a website you want to block.
For example, to block access to YouTube, or Netflix, type 127.0.0.0.1 www.youtube.com on this line.
- Click on File → Save to validate your changes.
- Close all browser windows, and go back to the browser.
Previously blocked sites should no longer be displayed in any browser.
Block a website based on user or time of day
To block certain websites based on time or user, you must go through your router’s web interface.
- Open your browser and enter your router’s IP address in the address bar.
Check the IP address of your router or try a common address like http://192.168.1.1, http://192.168.0.1 or http://192.168.2.1.
- Enter your username and password.
- Router interfaces vary by brand, but you will always find an access restriction tab.
- Enter the details of the sites, times and users you wish to block.
Blocking a website on Mac
To block access to certain sites in MacOS, you can set up “parental controls” through the Display Time preference in your settings. To do this, follow these steps:
- Go to Apple and open the System Preferences.
- Click on Display Time.
- In the left column, go to Content and Privacy.
- Enable the Content and Privacy Restrictions option.
- Under Web Content, select Allowed Websites.
- Click on the + icon and add the sites you want.