Annoying websites come to you when surfing the web and you must upset about that. So, In this tutorial, I am gonna show you how you can block websites in your Android devices and computers(PC).
Here, I am gonna tell you about, hosts file(and how to edit it) and some extensions for the same. There might be some applications available out there but no one takes risks installing them. Because of the reason of the spam stuffed into them.
You might be on the different operating systems and struggling from the same problems. And why not?
The annoying ads come in between reducing the user’s experience. Here’s the full guide on this topic.
What is Hosts File?
The host files is simply an operating system plain text file that maps hostnames and IP Addresses. It is used to automate devices from the point of networking. Whenever you try to visit or visit a website, it first fetches information from hosts file and then continues.
Now, blocking works the same way, if the hostnames are found, that page will be accessed from that IP. Otherwise, DNS are responsible for finding them. Originally, the file name is HOSTS.TXT which contains all the information regarding the IPs and hostnames.
These can be found in every device like Android, Windows etc. And using these only we can block any website using them.
What are Extensions?
Extensions may be defined as a part that prolongs or added to something to enlarge anything. The extensions also do the same work. Almost all browsers come the ability to add extensions according to the user needs.
Just like, many extensions are available to block any website in your browsers. And we gonna see how to use them in our tutorial.
Block Websites In Windows(PC)
Now you what to do? But how to do, you don’t know. Let’s learn how to edit the hosts’ file in Windows. It is just like editing a text file, the way we do it normally. Follow this step-by-step guide:
Navigate to C:\windows\system32\drivers\etc\hosts. Or simply open run from the start menu(win+R) and type in the same.
Now it will ask you to select an application to open it, select notepad.
The Hosts File is opened successfully. Here you want to make some changes and save it.
Scroll down to bottom and at the end, just add few lines like:
…and all the websites you want to block on your computer(Windows). Here 127.0.0.1 is the local host which is the standard hostname given to your device.
Save it. The websites will be blocked and you now cannot access them.
Block Websites In Android(Root)
To do the same in Android, you need a rooted device. Read about how to one click root Android without PC.
Once you have superuser permissions, you are ready to fire. Firstly, install ES File Explorer from Google Play. You want the root access because you have to explore root directory of the Android mobile. You can use any other explorer which offers root explore or default app.
Now, launch the explorer and enable Root Explorer from the left hidden menu. Navigate to /system/etc/ folder.
Here you will find the hosts file, open it using the ES Note Editor.
Do the same thing here also, what you did above. Add the above lines of code(127.0.0.1 www.google.com).
Save it. Try to browse the website you just blocked, you will not be able to access it.
For Browsers(Blocking Websites In Chrome, Mozilla etc)
There are several extension, the one I am gonna use is BlockSite. To add this extension, head towards the Google app store or Mozilla app store by simply searching on the Google. Once in the store, search for Block Site and install(add) the first plugin with higher ratings. The link is given above, you can go directly for Chrome users.
From the right upper corner, click the extension and once you on the website to block. Tap Block Site.
It’s all done. So this way you can easily block websites by editing the host’s file and using extensions. This may also get you rid of annoying ads which kept on coming in front. Hope you like the tutorial, stay tuned for more.
Do share it.