The internet is one of the largest repositories of content these days, making it almost impossible to live without. For any suggestion or solution, a quick internet search will land you to a website that hosts the information you need. However, with the number of websites popping up every second, not all of these are worth visiting.
Why Block A Website?
There can be many reasons why you may want to block a website. While many web pages are really important when it comes to the content, not all websites host important information. The biggest issue these days is data theft and phishing websites.
Such advert filled websites are known to be dangerous for extracting information by posing as a false authority like banking or gambling websites. In such a manner, they can trick users into entering their information, or worse, inject malware on the computers.
Apart from data theft, many websites spread viruses. Such websites can be the pages that host applications or games, and then spread viruses when you download such software. Else, such websites can also contain explicit content, which you may not want to see on your computer at all.
Finally, some websites are filled with advertisements. Such websites usually are redirect websites, meaning you land on them after clicking on another advertisement, or these websites redirect you to other ad-filled websites.
How To Block A Website On Windows Computers?
There are two methods that you can use in order to block a website on your Windows computer. These methods include blocking the website on a browser level, and the operating system level. I shall discuss both of these methods in brief, so let’s dive into it.
On Browser Level:
As the name suggests, this method will block certain websites on one browser only. This is useful if you wish to block certain websites from one browser if you use multiple browsers for different purposes. This involves using website blocker addons, which prevent users from visiting a website on a particular browser.
Note: This applies to macOS devices as well.
There are many website blockers available on both Google Chrome Webstore and Mozilla Extension Store as well. One of the most popular website blockers is AdBlock Plus, which is available for both Chrome and Mozilla. Another extension that you can use is BlockSite (Chrome Webstore).
For Internet Explorer, you will need to open Internet Options from the Windows Search. Go to the Restricted Sites section from under the Security tab. In the popup, manually enter the websites that you wish to block, and these pages will be blocked from Internet Explorer.
On Operating System Level:
You can block certain websites on the operating system level, which will block the page for all users on all browsers. This is useful if you are the administrator for your device, and want granular control over which websites can be accessed from your computer.
Follow these steps to block websites on Windows 10:
- Log in to the administrator account on your Windows 10 computer. This step is not required if you are the only user and have the appropriate admin rights.
- Open Windows Explorer using the shortcut Win + E.
- Navigate to the following path, by entering the location in the address bar:
C:\Windows\System32\drivers\etc - Take ownership of this folder if you already do not have the appropriate permissions.
- Locate the file named Hosts.
- Open this file with a text editor like Notepad or MS Visual Code.
- The last lines of this code should be as follows:
# 127.0.0.1 localhost
# ::1 localhost - After these two entries, enter the URL of the websites that you wish to block. Use the DNS 127.0.0.1, followed by the URL of the website. Check the image below for the same.
- Add as many websites as you like to this file, however, make sure to only add one website per line. This is because all the sites in a line will be treated as one entry, so subsequent websites will be treated as parameters and will not be blocked.
- Save the file, and then reboot your computer for the changes to take place.
How To Block Websites On MacOS X?
Similar to Windows, you can also block websites on macOS. If you are wondering how to block websites on Mac, two methods immediately spring to mind. These include using a third-party application and editing the host files similar to Windows. Apart from these, you can also use browser extensions, manage the screen time, and edit parental controls, however, we will discuss the more effective ones first.
Method 1: Use Third-Party Software
There are many third-party applications that you can use to block unwanted websites on your Mac computer. One of the best applications has to be Cisdem AppCrypt 4 Mac, which can lock down the applications on your Mac, while also acting as a website blocker at the same time.
Such applications work great if you want to block certain apps and websites in order to focus more on your work, especially now that we are all working from home.
Method 2: Edit The Host File
Similar to Windows 10, there is a hosts file in Mac OS as well, which can be used to block the websites on an operating system level. However, this can only be accessed from the terminal, so here are the steps for the same:
- Before starting, make sure to have administrator access to your Mac computer, as you cannot make system-level changes otherwise.
- Navigate the following path to launch terminal:
Applications > Utilities > Terminal - Type the following in terminal and press Enter to launch the Hosts file:
sudo nano /etc/hosts - You may be asked to enter the username and password for your Mac, enter them when you get the popup.
- Now, you should see the Hosts file open in a text editor.
- Scroll to the last of the file, and enter the website URL that you wish in the following format:
0.0.1 www.silicophilic.com - Again, make sure to only add one website per line. Create a new line for every new website that you wish to block.
- Once you have added the websites, press Command + X to close the file. Press Y to save the changes.
- In the Terminal, enter the following command:
sudo dscacheutil -flushcache - Finally, restart your Mac to save the changes.
Wrapping Up
So there you have it. Now you know how to block websites on your Windows 10 and MacOS X computer using the methods provided above. Comment below if you found this useful, and to discuss further the same.