I am looking to block a specific url like:


instead of the whole domain of


I have tried to edit the host file by adding an entry foobar.com/abc.php

but it didn't work. Tried restarting the data too.

Can anyone tell me what can be done?


i'm sorry to tell you, it wont work.

In the hostfile you can only set an IP-Adress of an domain manually. For example: I dont want that my pc always looks for IP-Adress for ilovethis.net.

Or a better one: I have many photos, videos and audio on my homeserver. But i dont want to always type (etc.) in my Browser.
Yes! I would add an entry to my hostfile which says: Domain home.server should go to (looks like: home.server)

I hope you know what i mean. This was not made for specific url, its for local DNS manipulation.

Greetings, Fischmaster

|improve this answer|||||
  • Actually on windows it works perfectly. Just by adding the url on windows PC that particular URL is blocked but on android its not working. – Aviral Sangal May 8 '16 at 2:18
  • Yes, of course. But i dont known if it even works in whole Linux. – Fischmaster May 8 '16 at 7:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.