Saturday, September 6, 2014

How to edit /etc/hosts and block websites and ads in Android phone

How to edit /etc/hosts and block websites and ads in Android phone

Hosts Editor is a beautiful and powerful Android application which allows you to edit /etc/hosts file in Android. Host Editor requires root privileges, so it works only on rooted Android phones. Unwanted sites and ads can be blocked by editing /etc/hosts file. If you have less or no knowledge about /etc/hosts file then don't worry. Probably that's not required to block websites or ads in Android phone.But, if you would like to know what exactly you are doing then read about "/etc/hosts" and "localhost 127.0.0.1".

Below is how you can do it.

1. Root your Android phone. There are many ways to do it and process differs from phone to phone.Refer some online tutorial to do it. Intention of this post is to block sites and ads, so I am not talking rooting the phone.

2. Install "Hosts Editor" from playstore using the link - http://goo.gl/8aHsB1

3. Open Hosts Editor application in Android phone.

4. Click on '+' mark to add an entry
 

5. In IP Adress field add "127.0.0.1" and in Hostname field add the name of the website which you want to block. For ex - "www.facebook.com", "www.gmail.com"



6. Click on "Add Hostname" option and you will see this entry in /etc/hosts.

7. Restart your phone.

8. Open your browser and enter the name of the website you just blocked, BOOM!!! "webpage is not available"!!!.



Note: You can unblock the website by removing the entry from /etc/hosts files.
Share This

No comments:

Post a Comment