Do you want to block certain websites from your children, employees or any other member of your family? Go through this security guide to learn how to block websites in a computer, phone, and network using the hosts file and other tools. This is not a computer hacking method, just a simple utility app or/and file editing trick.
Well, I have again come with the latest computer tutorial that can help you to block websites in Windows XP and above Microsoft Windows versions. So that no one in your family or company can access to that particular blocked websites.
Recommended for you: Show custom legal warning notice when a user login to your machine.
Block all unwanted sites such as Facebook, Twitter, YouTube, porn or adult websites, proxy sites, games sites, etc.
This website blocking trick is very helpful for parents and employers to block websites that should not be accessed by the children as well as workers.
You can block any number of websites without any limitations. The blocked website access will not be possible from any of the internet browsers that have already been installed on your computer such as Internet Explorer, Firefox, Safari, Google Chrome, Opera, etc.
Block Websites Using Hosts File in Windows Machine
To block websites using the Windows hosts file, you need to edit Windows hosts file with the IP address 127.0.0.1 (localhost). If anyone tries to log into that blocked website, it will automatically redirect to the localhost IP address and the webpage will show “Page Can’t Display“.
Open the Windows hosts file from the operating system’s installation directory and add sites that you want to block following the localhost IP address.
- Go to My Computer or This PC
- Locate the drive in which the operating system is installed (basically it always C Drive) and go to Windows => System32 => drivers => etc
- Here you will find a file named hosts.
- Right-click on hosts file & open it with notepad.
- Go to the last line and use IP: 127.0.0.1 to block websites. Simply add website address after this IP (there must be a space between IP and website link) example: 127.0.0.1 facebook.com
- After adding website addresses in the hosts file, simply save the file on the same location or press Ctrl + S.
- Now it’s done 🙂
Another way to locate hosts file folder
1. Open Run box by press Win+R or go to start menu and click on Run.
2. Copy-Paste below code in the Run box and hit Enter. You will see hosts file there.
3. Now follow the above steps from 4 to 7.
This method to block websites was for Windows computers.
If you’re using a MAC computer, see the below method.
How to Block Websites on a MAC Machine?
Now let’s move on a Mac tutorial to block websites access in a Mac system (OS X).
Login to MAC user that has the administrator access and open the Terminal.
- Launch Terminal: Go to Applications => Utilities => Terminal
- In the Terminal window type nano /etc/hosts and hit enter to open the hosts file in the text editor. This command may prompt to enter the user’s (login) password for authorization, just type your password.
- In a new line, type the domain name in this format 127.0.0.1 www.example.com to block this particular website. You can add any number of sites to restrict accessing these web pages. Just start a new line for each website address following the above green highlighted code.
- When you finish adding the sites that you want to block, just press ctrl+x and then Y to save changes to the file.
Now, all done!
Reboot your machine to finishing the task of blocking website access.
Block Websites on Your Phone or Tablet
Block websites on an Android phone or tablet using the antivirus app.
Trend Micro antivirus for Android allows users to block websites that they don’t want to access.
- Install the app on Google play store and go to Options => Safe Surfing.
- To disable accessing sites, here you will have to create a free account. Swipe to Parental Controls and click on setup account. After creating the account, you will see an option – Blocked List in the app.
- Tap blocked list and start adding sites that you wanna restrict.
Via using this feature, you can block all unwanted websites.
Then, no one would be able to open these sites on your android smartphone.
Block websites on a Windows phone or tablet
Unfortunately, there is no permanent way to fully restricting a site on Windows mobile.
However, you can use the AVG Family Safety browser as it blocks websites with explicit or malicious content by default.
If you consider spending some money to purchase an AVG antivirus license, you can customize the list of blocked sites.
Block websites on an Apple iOS device
Apple has come with a pretty useful feature of handy parental control tools by default that allows users to block websites.
- Go to Settings => General => Restrictions and tab on Enable Restrictions.
- Now type a password for restricting sites. Make sure you’re choosing a different passcode from the one you use to unlock the iOS device.
- Once you set the passcode, scroll down and tap the Websites. Here you can see some various ways to restrict a site. Just start enabling the features that best suit your needs.
When someone tries to access a blocked website, the system shows a message that
You cannot browse this page because it is restricted
To browse that particular blocked site, you need to tap Allow Website and enter key in the Restrictions Passcode.
Block Websites on Your Network
Block websites in the network – the best and easiest way of restricting sites is a WiFi router.
If you’re using a WiFi network in your home, then it’s a pretty cool way to block websites.
- Reach to your router via entering the default router’s IP address in the browser. Many router brands have a different default IP address. But, most of the WiFi router companies use 192.168.1.1 as a default IP. To check yours, see the back panel of your router or read the manual guide that came with your router.
- Login to the router by entering the username and password. Again see router’s user guide or look at the back panel of the router to find the login credentials.
- Once you logged into the router, just find an option something like Parental Control, Access Restrictions, Access Management, Internet Access Policy. Whatever the word is there on your router, just understand the mean of the same sense. Here you can set the sites that you wish to block.
- After adding the sites, simply click on Save and reboot your router to make sure all websites blocked successfully.
Any device connected to the router will not have access to the blocked sites.
This is the best solution for employers as well. But, remember to note that blocked websites can be easily bypassed when using a reliable VPN service.
If any of the above solutions to block websites seems hard to do for you, don’t mess it yourself, just think to take help with a professional tech expert.
I hope all the above ways to block websites in computer, network & smartphone are helping you to restrict unwanted web pages. If you need some more support, just do comment below and please if you like it, share it on social sites.