PrvN
PrvN

Reputation: 2395

How to block some url on android browser?

How to block some url (site) on android default browser?

I want to restrict user to access some url which are black listed.

eg. If i want to block facebook then phone built-in app browser will not access this facebook site.

Upvotes: 7

Views: 13520

Answers (3)

Adrián Rivero
Adrián Rivero

Reputation: 161

There's a work around which is using a VPN service to monitor and filter all the traffic.

An example of this is the NetGuard project:

https://github.com/M66B/NetGuard.

Of course, the user should give his permission to permit this service to take control of the traffic. And in some systems, some system applications are not directed to this service (I've noted that the Samsung Web Browser traffic is not sent through the system VPN).

Upvotes: 0

Siebe
Siebe

Reputation: 952

Do you want to block some websites on a user's device by letting them install an app?

If that is the case, it will only work if they are rooted. If they are, then you could add an entry of the url to the hosts file and redirect it to another ip address (eg 127.0.0.1). But since they need to be rooted, they will probably get a popup asking for permission to access root. This could raise some suspicion with the user.

On a device that's not rooted, preventing the standard browser from accessing a certain website is not possible by installing an app.

Upvotes: 9

Raghav Sood
Raghav Sood

Reputation: 82543

You can't prevent the user from using their browser on their device to access any site.

If you want to do this, make your own browser and replace the one on their device with it (may not be possible without root).

Upvotes: 1

Related Questions