Hey there!
If you are a regular internet user, you might know the worse cases of facing Spamming sites,Irritating Ads and custom redirects to pornographic contents.
Also there are number of websites which serve illegal stuff.
It's a world where everyone use smartphones and it would be awesome if you are able to block such crappy websites from your Android.
With this trick you are able to block any websites on your device without using any third-party apps.
Android allow us to block websites by editing hosts.txt file which is located in the root directory of the android system.
Understanding the hosts.txt file?
Android allow us to block websites by editing hosts.txt file which is located in the root directory of the android system.
Understanding the hosts.txt file?
The file hosts.txt is typically a plain text file which is used for mapping domain names to certain IP Addresses.
When you try to reach a website from your browser,Your browser first checks the hosts.txt file for mapped ip address of the domain name you entered.If it found that website mapped to any IP,then the browser force that website to that mapped IP otherwise it will send the request to DNS server to find actual address.
If the actual address found in the server then it will redirects to the website you are searching for then you will see the website running on your browser.
Using this hosts.txt file you can redirect any website to any IP you want.
In this trick i will block websites by redirecting the websites to localhost(128.0.0..1).
Steps To Produce:
NOTE: YOU MUST HAVE A ROOTED DEVICE FOR THIS TRICK
3. Now open that hosts.txt file add any website which you want to block as shown in the picture.
1. Open any File Manager which has root explorer in it. In this case im using MiXplorer
2. Now open root directory of android system and navigate to Root->System->etc->hosts.txt as shown in the picture below
hosts.txt file in root directory of the system |
Eding a hosts file to block websites |
4. Now try to open a website which you blocked in hosts.txt file then you will see error like this because you are forcing the website to 127.0.0.1
Showing error of the website you blocked in hosts.txt |
Hurrayy!! Now you can block any website of your wish.
Please consider sharing if this article helped you!
Please consider sharing if this article helped you!
0 Comments