How to Block Websites on Computer

You want to block a website, for whatever reason, this is a simpler operation than you think. Although it requires some code, but it is mainly copy and paste, all internet browsers allow you to block individual websites easily. Make sure you understand the instructions well before proceeding. Note: You need 'Administrative' permission to make the changes below. That is, you must be the primary user of the computer and know the password.

Block websites on Windows

How to Block Websites on Computer Picture 1How to Block Websites on Computer Picture 1

Open My Computer and find the "C:" drive. To block the website on any browser, you need to access and edit the "HOST" file. This file helps you to convert URLs such as www.google.com to a digital DNS address. However, with just a little tweaking, you can use this switch to block computers from accessing specified websites.

If you don't see a "Windows" folder in your C: drive, try looking elsewhere. Usually we install Windows on the C drive, but sometimes you also choose another drive if you install Windows yourself.

How to Block Websites on Computer Picture 2How to Block Websites on Computer Picture 2

Find the "etc" folder in the drive. Go to Windows -> System32–>drivers–>etc. In the etc folder, find the file "Hosts".

The location you are aiming for is C:/WINDOWS/system32/drivers/etc. You can enter this path in the top bar in My Computer if the etc folder is not found.

You can find it by typing "notepad C:/Windows/System32/drivers/etc/hosts" into the Command Prompt window. To use the Command Prompt, find and open the program in the Start menu.

How to Block Websites on Computer Picture 3How to Block Websites on Computer Picture 3

Open the file "hosts" with Notepad. Double click on the Hosts file and choose open with Notepad. That way you can edit files and block specific websites.

If you don't see an option to open with Notepad, open the Notepad program. Then click on "File" → "Open" in Notepad and find the Hosts file like in the previous step. Click on the file to open it.

How to Block Websites on Computer Picture 4How to Block Websites on Computer Picture 4

Drag down the space at the end of the file. You'll see lots of code and text, but you don't have to touch them. Scroll to the bottom and find the line "127.0.0.1 localhost".

Do not edit or change anything. This file is extremely important when connecting to the internet, you just need to add a few lines at the end of the text to block the website.

How to Block Websites on Computer Picture 5How to Block Websites on Computer Picture 5

Press enter to create a new line at the end of the text. Start a new line just below the "localhost" line.

How to Block Websites on Computer Picture 6How to Block Websites on Computer Picture 6

Block the site by entering the web URL after "127.0.0.1". At the beginning of the line, you type 127.0.0.1, press the spacebar and then type the URL of the website. For example, to block Google, you would type "127.0.0.1 www.google.com".

Do not add "http://" in front of the URL, so you will not block the website.

How to Block Websites on Computer Picture 7How to Block Websites on Computer Picture 7

Add other websites to block with separate lines. If you want to block multiple websites, just press "enter" to get a newline. Type 127.0.0.1 and the website URL. This method does not limit the number of blocked pages.

How to Block Websites on Computer Picture 8How to Block Websites on Computer Picture 8

Save file. After blocking the page, click "File" → "Save". Close the browser if you're using it, then reopen it. The site will be blocked on all browsers.

Block websites on Mac

How to Block Websites on Computer Picture 9How to Block Websites on Computer Picture 9

Open Terminal. This is the program with which you can make administrative changes to your Mac. Use the search bar or look in Finder /Applications/Utilities/Terminal.

Terminal has a black window icon with white letters. It allows you to execute code on the computer.

How to Block Websites on Computer Picture 10How to Block Websites on Computer Picture 10

Copy the current hosts file in case it's edited by mistake. Although it hasn't changed much, it's still best to back it up. To do it automatically, enter the command 'sudo /bin/cp /etc/hosts /etc/hosts-original' into the Command Line and press "enter".

You may be asked to enter the administrator password. This is the password used to open the device when it is just booted.

How to Block Websites on Computer Picture 11How to Block Websites on Computer Picture 11

Open the hosts file. Type 'sudo nano /etc/hosts' and press "enter" to open the "hosts" file in another window. This is the file that needs editing to block the website. Scroll down, skip to the bottom line (usually a phrase with "localhost").

How to Block Websites on Computer Picture 12How to Block Websites on Computer Picture 12

Start new line with 127.0.0.1. This is the line that tells the computer the website to block. Type the number and press the spacebar.

How to Block Websites on Computer Picture 13How to Block Websites on Computer Picture 13

Add the website you want to block after the number. You enter the URL of the website after the space, starting with www. For example, if you want to block Google, type "127.0.0.1 www.google.com". Don't forget to type in a separate line.

Do not add "http://" in front of the URL.

How to Block Websites on Computer Picture 14How to Block Websites on Computer Picture 14

Add more pages to each line separately. If you want to add a page, press enter and then type 127.0.0.1, the way, the website's URL. The computer will completely block this website on all browsers.

How to Block Websites on Computer Picture 15How to Block Websites on Computer Picture 15

Save file. Press the Control Key + "O" (the letter O, not the "zero") to save the file, then close the window. The changes are about to take effect.

Reset the cache to apply the change. In Terminal, type 'sudo dscacheutil -flushcache' and press "enter". This is a cache cleanup that allows you to apply changes. Open a browser to check if the change has taken effect.

If not, check the hosts file again, make sure you change it at the bottom of the page, in a separate line, and in the correct format.

If it still doesn't work. Restart the machine and load the page again. This time the computer will block the website.

Block websites on separate browsers

Internet Explorer

How to Block Websites on Computer Picture 16How to Block Websites on Computer Picture 16

Open Internet Explorer. Internet Explorer (IE), Microsoft's browser allows you to block websites without taking too much action. However, these changes will not affect other browsers, such as Firefox.

How to Block Websites on Computer Picture 17How to Block Websites on Computer Picture 17

In the top menu, click Tools > Internet Options. You will see a settings window that allows you to adjust the pages to block. There are many tabs at the top of the window where you can adjust settings.

On newer versions of IE, you'll see a wheel icon instead of "tools". Click on the wheel, select "Security Settings".

How to Block Websites on Computer Picture 18How to Block Websites on Computer Picture 18

Click on the Privacy tab, click on "sites." Type in the address of the website you want to block and click OK. With this method, you can only block one website at a time.

On newer versions of IE, you must click on "Restricted Sites" > "Sites".

How to Block Websites on Computer Picture 19How to Block Websites on Computer Picture 19

Use a Microsoft account to block specific websites on the new IE browser, aka Edge. To block websites on the new version of Internet Explorer, which has been overhauled and renamed "Edge", you need a Microsoft account. As such, you can adjust your online preferences to block any website from your account.

To do this, go to https://account.microsoft.com/family/about?refd=windows.microsoft.com

Mozilla Firefox or Google Chrome

How to Block Websites on Computer Picture 20How to Block Websites on Computer Picture 20

Open a web browser. Firefox and Chrome do not have a built-in website blocking feature, you can download the free plug-in for easier operation.

On Chrome, you need to go to the Chrome Web Store. On Firefox, add-ons are called "Add-ons".

How to Block Websites on Computer Picture 21How to Block Websites on Computer Picture 21

Access the selection of add-ons you need. Click on the 3 gray horizontal bars in the right corner of Firefox browser, select "Add-Ons" to access parental control options or block websites. On Chrome, click the "Apps" button in the upper-left corner of the screen, then click "Web Store".

How to Block Websites on Computer Picture 22How to Block Websites on Computer Picture 22

Find and download the appropriate plug-in. Mozilla has a handy page of the best parental controls and website blocking features here. If only regular web blocking, you can choose "BlockSite".

If you're looking for a more powerful program, search for "parental controls or filters" on the online store or add-on library. These programs have special controls so they can block all kinds of websites, similar to a dark web filter.

Once downloaded, the plug-in will be activated and ask which sites you want to block.

If the plug-in cannot be found, click on the 3 horizontal bars in the corner and select "Add-ons" (Firefox) or "Extensions" (Chrome).

Safari

How to Block Websites on Computer Picture 23How to Block Websites on Computer Picture 23

Open Safari and click on the Apple icon in the upper right corner of the screen. You will see settings and options appear. Safari doesn't block websites, but rather restricts the websites you choose more tightly.

How to Block Websites on Computer Picture 24How to Block Websites on Computer Picture 24

Select System Preferences and look for Parental Controls. This function allows you to block websites and set yourself a "parent account" to know what other people can access on Safari.

How to Block Websites on Computer Picture 25How to Block Websites on Computer Picture 25

Click on "Convert this account to a parental controls account." (Convert this account to a parent account). This requires you to enter the administrator password -- the account used to log into the computer at startup. After entering the password, you will see the Parental Controls window.

How to Block Websites on Computer Picture 26How to Block Websites on Computer Picture 26

Click on "Web" > "Allow access to only these websites." (Only allow access to these websites). This is the action that starts the limited functionality on Safari. You can add pages with "+" and "Add Bookmarks".

To regain full control, simply uncheck "allow access to only these websites".

4 ★ | 4 Vote