Block websites at system level? Android way? Like hosts file in windows?


Recommended Posts

Hi. I want to block certain sites on my phone but I don't want an app that will keep track of all my site visits.

 

Can it be done, like in windows, by redirecting certain urls to local host at system level ?

 

I am on unjailbroken android 11 phone

  • +Random Stranger changed the title to Block websites at system level? Android way? Like hosts file in windows?

Not that I know of. The only thing I could think of is to find some sort of DNS service that you can use to block websites and then set that up as the Private DNS provider on your mobile. I use PiHole myself at home but that does not work when I leave the house.

  On 18/01/2022 at 08:09, MarkusDarkus said:

Not that I know of. The only thing I could think of is to find some sort of DNS service that you can use to block websites and then set that up as the Private DNS provider on your mobile. I use PiHole myself at home but that does not work when I leave the house.

Expand  

Well - this might work since I mostly want to stop procrastinating at home - and wasting time.

 

Outside home is less important

 

 

But surely there must be a way????

  • 4 weeks later...
  On 18/01/2022 at 07:45, E.Worm Jimmy said:

Hi. I want to block certain sites on my phone but I don't want an app that will keep track of all my site visits.

 

Can it be done, like in windows, by redirecting certain urls to local host at system level ?

 

I am on unjailbroken android 11 phone

Expand  

 

https://www.google.com/amp/s/www.modmy.com/how-modify-hosts-file-your-android-device%3famp

  • Like 1

android does have a hosts file but it requires root to modify (Adaway uses the hosts file and that's why it requires root to use as example)

 

if there's a way to modify the hosts file without root then I'm not personally aware of it.

 

note: I can't open techbeck's link here at work to see if it's a non-root method

  On 15/02/2022 at 16:26, Brandon H said:

android does have a hosts file but it requires root to modify (Adaway uses the hosts file and that's why it requires root to use as example)

 

if there's a way to modify the hosts file without root then I'm not personally aware of it.

 

note: I can't open techbeck's link here at work to see if it's a non-root method

Expand  

Try this.   

 

https://www.modmy.com/how-modify-hosts-file-your-android-device

 

Posts a method of non root but I personally have not tested it.  The hosts file as something that's always been on Android I believe. I've been messing with it for a while now.

  On 15/02/2022 at 19:00, techbeck said:

The hosts file as something that's always been on Android I believe

Expand  

oh yeah, with Android's Linux/Unix origins it's always had a hosts file.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • The Irony... China wouldn't be what it is today without Apple 😂
    • Microsoft makes it easier to find PC specs in Windows 11 Settings by Taras Buria Windows 11 has already received several improvements that make it easier to learn about your computer's specifications. Recently, Microsoft released Spec Cards for the System > About section, which provide basic information about the PC's main components, such as processor, memory, storage, graphics card, and video memory. Now, the Settings app is getting a new way to find your device info. Microsoft wants to display basic device information right on the Home page of the Settings app. The latest preview builds from the Dev and Beta Channels introduced a new "Your device info" card for the Settings' Home page. It displays specs like processor name and speed, graphics card and the amount of video memory, storage, and RAM. The card also has a link to the "About" section, where you will find more information about your computer, its Windows edition, product ID, and the recently introduced FAQ section that answers common hardware-related questions. The "Your device info" card joins the existing cards on the Settings app's home page. While the section offers useful information like quick access to Bluetooth devices, Wi-Fi, personalization, and recommended settings, users received it with mixed reactions, as many considered it another way for Microsoft to promote its services and subscriptions like Microsoft 365, OneDrive, and Game Pass (seriously, who thinks about Game Pass when opening Settings?). Now, the Settings' Home page is a bit more useful, as it saves you a few clicks when checking your computer's specs. If you want to test the new "Your device info" card, update your PC to build 26200.5622 or newer (Dev Channel). Just keep in mind that Microsoft is rolling it out gradually, and it requires signing in with a Microsoft Account in the United States. Other changes in build 26200.5622 include a new Settings section for Quick Machine Recovery, widget improvements, more app recommendations in the "Open with" dialog, and more. Check out the full release notes here.
    • Ponies will finally have good games to play after replaying Last of Us for the 100th time. Oh and I lied, Silent Hill f looks pretty great too, but we already knew about that.
  • Recent Achievements

    • Week One Done
      jbatch earned a badge
      Week One Done
    • First Post
      Yianis earned a badge
      First Post
    • Rookie
      GTRoberts went up a rank
      Rookie
    • First Post
      James courage Tabla earned a badge
      First Post
    • Reacting Well
      James courage Tabla earned a badge
      Reacting Well
  • Popular Contributors

    1. 1
      +primortal
      397
    2. 2
      +FloatingFatMan
      177
    3. 3
      snowy owl
      170
    4. 4
      ATLien_0
      167
    5. 5
      Xenon
      134
  • Tell a friend

    Love Neowin? Tell a friend!