Last Updated on 3 years by Komolafe Bamidele
Is it possible to block a website on all web browsers without having to blacklist the site on each browser? Yes and fortunately, the ways to doing so won’t require you to have much technical knowledge. All you have to do is follow the guide below.
Through this guide, you will learn how to block a website on Mac, block a website on android, block a website on windows, and block a website on iPhone
How to Block a Website On Windows
If you’re using a windows laptop or computer, you can follow the guide below to block a website on all web browsers on windows.
The guide has been simplified so it will work for you regardless of the version of windows you’re using whether its windows 7, windows 8 or windows 10.
On your computer keyboard, press the Windows button, or you can just open the Start Menu.
In the search bar, type notepad.
When the Notepad App is displayed, right-click on Notepad and click on “Run As
Administrator“. This will allow you to edit the hosts file.
A prompt will appear, click “Yes” to confirm your decision.
When done a notepad window will open. On the notepad window click on “File” and then click “Open“.
A new window will pop up. Here you will have to go to the Hosts file’s folder. To do so, click on ‘This PC” tab on the left-hand side. If you’re using Windows 7, click on “Computer“.
Double-tap on your computer’s hard drive (e.g Local disk C or OS (C:))
A new menu will open. Double-tap on the Windows folder
The files in the folder are arranged alphabetically so scroll down till you find the System 32 folder and double-tap on it.
Next double-tap the driver’s folders, and then the etc folder
At the bottom, tap on “Text Documents” and then on “All Files”.
Right-click the hosts files, then click on properties >> security >> edit. Tick the “Full Control” box.
Click Apply and then OK.
Go back to the hosts file and double click on it.
Once it opens, you can begin to edit its contents. Scroll down to the bottom of the file to where you see the ..1 localhost, just below 127.0.0.1 localhost.
Click just below the last line of text on the file and type in 127.0.0.1 and press tab.
In this case, you would be blocking Facebook. Type in the details as shown above to block your web browser from accessing Facebook.
Whenever you want to start a new line, press the enter key. You can block as many websites as you want using this method.
When you’re done, click on save.
How to Block a Website On Mac
Open Spotlight and type Terminal into the search bar. Double-click on it when it is displayed.
Type in “sudo nano /etc/hosts” into the Terminal and click Return.
Type in your passwords and click return.
The hosts file will be displayed. Scroll down to the bottom of the page just below the last line of text.
Type in the localhost address (that is 127.0.0.1) into the blank space. Press the tab key and then type in the address of the website you want to block.
Press return and on next line, type in 127.0.0.1 again, press the tab key and type in the same website address but this time add www.
This way you can block the website thoroughly.
Do the same for all the websites that you want to block.
Press Control + X to exit the hosts file in the text editor. Then press Y to save your changes. Avoid changing the filename, instead, just save it as it is.
How to Block a Website On iPhone
Open the Settings app on your iPhone. Once open, click on general, then on restrictions.
You will be prompted to enter your restrictions passcode or Enable Restrictions.
Under the “ALLOWED CONTENT” heading, tap on Websites.
Click on Limit Adult Content
Below the “NEVER ALLOW” heading, tap add a website
Type in the address of the website you want to block, then click on done.
You can add as many websites as you want using this method. This way you can block all sites on your web browsers at the same time.
How to Block A Website On Android
The only way to block a website on all browsers in Android is to use a 3rd party app. There are other methods like using OpenDNS or firewall, however, these methods are quite complicated. You could also block a website on each browser through the browser settings. This is the best way to block a website on your Android phone without using a 3rd party app.
To block a website on all web browsers on your Android device, you will have to use the Blocksite app.
First, you will have to download and install the Blocksite app from Google Play Store.
Once installed, launch the app and enable its accessibility to allow it to block websites on your web browsers.
This action might close or minimize the app.
Open it again and tap on the + icon in the bottom-right corner of the screen.
Type in the address of the website you want to block in the text field.
With this app, you can not only block websites but apps too.
Things To Note When Blocking A Website On All Web Browsers
- Avoid deleting any of the original text from the hosts file in Windows or Mac
- When blocking a site through the hosts file, type in the site twice, first without the www and the second with www. Make sure you type in the localhost address twice too.
- Avoid changing the filename of the hosts file when saving. All you have to do is overwrite the original file so simply pressing Ctrl + S in Windows or Y in Mac is enough.
These are the ways to block a website on all browsers. If you don’t fancy using the BlockSite app on your Android device, you can try out other apps and methods like the Mobile Security app, Firewall, and OpenDNS.