Distraction is much common towards works, obviously when you are connected to the Internet. This article is all about how to block website to prevent access. No need to download additional software to block websites. A straightforward way to block website & allowing people to stop using your system all the time. It’s a great way to stop children from adult content on the internet.
Steps to block websites in windows
-
- Open Notepad as administrator.
- Type Notepad in Taskbar, Right click on Notepad program from search result
- Select Run as administrator & click Yes button when you see the User Account Control pop-up.
- Click on File menu, select Open and
-
- Change the bottom file type from *.txt to All files(*.*).
- Navigate to C:\Windows\System32\drivers\etc and select hosts file.
Here C: is the drive where Window is installed
-
- Then at the bottom of file. Type each website’s name that you want to block with prefix 127.0.0.1
- Open Notepad as administrator.
127.0.0.1 www.facebook.com
127.0.0.1 www.youtube.com
- Save the file (Ctrl + S).
Now restart your web browser and sites won’t available anymore.
To unblock website just repeat the same steps and remove the website from hosts file & save it.
Steps to block websites in Linux
- Open terminal shortcut keys Ctrl + Alt + T.
- Type sudo gedit /etc/hosts and type Ubuntu password.
- Then at the bottom of file. Type each website’s name you want to block like this:
127.0.0.1 www.facebook.com
127.0.0.1 www.youtube.com
- Save File, press Ctrl + S, save Steps tested in Ubuntu.
if this above step doesn’t block websites then restart your browser or system to work.
Steps to block websites in Mac OS
- Open Terminal from Spotlight.
- Type sudo nano /etc/hosts and press enter, and type Mac’s password.
- Then at the bottom of file. Type each website’s domain name you want to block like this:
127.0.0.1 www.facebook.com
127.0.0.1 www.youtube.com
- Save and exit the editor.
Now restart your web browser and sites won’t available anymore. If this didn’t work then you need to flush DNS cache by typing sudo killall -HUP mDNSResponder
in terminal.
Why is this working? Explanation
In this, we are modifying the hosts file. The hosts file is priority file used for mapping IP addresses to domain names i.e for defining routes. 127.0.0.1 is loopback mechanism means this address is used to establish a connection with same user machine. In this modified hosts file, domain name is mapping with 127.0.0.1 and redirected to user machine.
If you’re already using this hack? How are they working for you? Sound off in the comments below and let us know.
You’ll also like:
Fake Your Location in Google Chrome
Easiest Way To Embed Newest Facebook Post into Website Automatically
Everyone Must Clear What Google Knows About Us
19 Advanced Ways To Search Google Like A Pro