Helping people with computers... one answer at a time.
There are ways to block URLs in IE, but doing so will block them from all other programs as well.
Is there a way to block certain URL's in IE?
Actually, there is, yes. But when you do it, you'll be blocking them in IE and any other program that might attempt to access them.
Interestingly enough, it's the same technique that some viruses use to block you from getting to anti-virus sites.
Normally Windows uses what's called DNS to map a domain name, such as "microsoft.com" to an IP address, like "188.8.131.52". It's easier for you and me to remember domain names, and this also allows the domain name owners to change their internet addresses at will.
The "hosts" file is a plain text file that can contain overrides to DNS. In it you can hard-code the IP addresses that domain names will map to. Normally, it's not used at all, but it's a great opportunity to block access to domains you don't want accidental access to.
The hosts file is typically found in "c:\windows\system32\drivers\etc\hosts". You may need to change the file's read-only attribute so that you can make changes. Open it in notepad.
You should notice an entry like this:
That defines the IP address of "localhost" to be 127.0.0.1, which by definition is your own machine.
To block a site, just add a similar entry to the end of the file. For example:
Now "www.badsite.com" is mapped to your machine. Since you're probably not running a web server, any attempt to visit that site using a browser will fail. In fact, ANY attempt to use "www.badsite.com" will get directed to your own machine and will typically fail.
The only caveat is that addresses are often cached by the software. That means you may need to exit all instances of your browser, for example, before the blockage becomes apparent. In the worst case, reboot, and it should take effect.
By the way, if you open the hosts file and find a long list of what look like anti-virus site domains, you've been infected by a virus and probably want to scan as soon as possible. And feel free to delete those entries from the file.
Comments on this entry are closed.
If you have a question, start by using the search box up at the top of the page - there's a very good chance that your question has already been answered on Ask Leo!.
If you don't find your answer, head out to http://askleo.com/ask to ask your question.