Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sometimes when I'm reading news I click on a headline and it takes me to telegraph.co.uk news which I don't like to read, so I tried to make my hosts file redirect to localhost. So in my hosts file I put 127.0.0.1 telegraph.co.uk

which works if I just type in that exact address, but if it has a longer URL it gets through how can I block all telegraph.co.uk articles, including those in this format

http://www.telegraph.co.uk/news/worldnews/middleeast/iraq/6913907/Iraq-hostages-Peter-Moores-kidnapping-masterminded-by-Iran.html

share|improve this question
up vote 8 down vote accepted

www.telegraph.co.uk and telegraph.co.uk are two totally different addresses. Place 127.0.0.1 www.telegraph.co.uk in your hosts file as well.

This is because the www. is simply a subdomain of telegraph.co.uk, not a particularly special part of the web. They simply both lead to the same place - but the hosts file is not very clever, you have to be very clear and verbose when blocking things.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .