English

Here's how to block certain sites on PC and Mac - Tech Advisor

  • Home
  • Article
  • Here's how to block certain sites on PC and Mac - Tech Advisor
Here's how to block certain sites on PC and Mac - Tech Advisor
Images
  • By electronics-phone
  • 844 Views

To block a website on your PC or Mac, there is no need to resort to the use of third-party software.

The method that we propose to you in the rest of this tutorial is simple and free. On Windows, it even allows you to prevent access to certain Internet pages based on a user or a time of day.

How to block a website from your PC

To block a website from your computer, you just have to go through your Windows HOSTS file. Below, we have put together the steps to follow:

Voici la marche à suivre pour bloquer certains sites sur PC et Mac - Tech Advisor

Now, previously blocked sites should no longer show up in any browser.

Block a website based on user or time of day

To prevent access to certain websites based on time or user, you must go through the web interface of your router.

How to block a website from a Mac

To prohibit access to certain sites from macOS, it is possible to configure a “parental control” via the Screen Time preference in your settings. Here's the procedure to follow :

Otherwise, you can go through the Terminal. To do this, go to Finder → Applications → Utilities → Terminal. Enter the command line sudo nano /etc/hosts, then hit Enter.

Enter your administrator password, at the bottom of the Hosts file you need to create a new line by pressing enter after localhost. Type 127.0.0.1 followed by a space and the url to block (without http:// or https://).