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.

I've tried editing "C:\Windows\System32\Drivers\etc\hosts" by adding: websitetoblock.com

But I can still access the website. Ideally I want to be redirected to a URL of my choice if I try to access the other one. How can I do this?

share|improve this question
Are you trying to do this at a system level (so for everyone who uses the computer) or at a browser level (for someone who uses chrome, for example) –  Chipperyman Apr 25 '13 at 17:11
add comment

3 Answers

Flush the DNS resolver cache. No need to reboot to do this; at the command prompt, type:

ipconfig /flushdns

The hosts file cannot be used for HTTP URL redirection.

share|improve this answer
Yeah, I could not remember the flushing command. If he did reboot, that would of course work as well. –  Deleted Apr 25 '13 at 17:13
add comment

It looks fine. Try restarting the computer. The name is probably already resolved and cached.

share|improve this answer
add comment

edit the hosts file as follows. http://www.facebook.com

if you edited your host file like this, when you go to fb u will be redirected to google.com

share|improve this answer
add comment

Your Answer


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.