Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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