URL block

Posted on 2004-10-07
Last Modified: 2008-03-17
Hi Peeps,

Can I block a particular URL in XPpro or Win2k? I have tried in the internet properties (restricted site list) but it still lets me browse that particular site.


Question by:university1
LVL 13

Expert Comment

ID: 12247017
I don't know any integrated XP method to block an url.

You have some shareware products, such as URL capture :


I think you can also block a site by editing the host file (c:\windows\system32\drivers\etc\hosts : without extension )

In it, you can perxemple set
With that, each time your computer resolves, it will send you tou yourself...
But you can't use that with a full URL (ie : ).. it must be a hostname.

Perhaps, you have an other option to block Urls on your router ? OR on your firewall if you have one ?


Accepted Solution

thunder_moose earned 50 total points
ID: 12247641
Hey there,

The restricted sites thing won't work, because it just restricts what those sites can actually do, and not the sites themselves. For instance, it'll disable Active X controls or scripting or whatever in the page, but you'll still be able to view it.

In order to completely block a page, follow seb_acker's advice. An easy way for you might be the Hosts file method that he suggested. The hosts file contains DNS mappings, so it converts the user-friendly name you type in, into an IP address that the computer understands. The computer checks it FIRST, before checking any DNS servers. So if a entry for the site exists in the hosts file, then it'll try that address. is an address that refers to your own machine (in the hosts file, you'll see that it is mapped to "localhost" that's why you can use a command like ping localhost). So if you put a entry in the hosts file with that IP, it'll look for the site on your computer, won't find it, and won't load it.

Open your hosts file and add the line:       

In the same format as any entries already present, where siteyouwanttoblock represents the site you want to block.

This post was just to clarify the hosts file a bit. Since you're clearly not too worried about somebody being able to change what it says (you used Restricted Sites after all) I suggest using the hosts file method. It's fast, easy and free. If you do use it, give Seb the points since he suggested it first.

LVL 27

Expert Comment

by:Asta Cu
ID: 12250674
You've surely gotten what you need in the above, but find this interesting about URL filtering (not for points), just informative.
Restrict access to non-work-related sites. These third-party solutions integrate with Internet Security and Acceleration (ISA) Server to filter sites that have objectionable or restricted content. These independent companies offer ISA Server–compatible and complementary third-party solutions.

Expert Comment

ID: 12255623
just for a discussion,
even if you use third party software like websense, surfcontrol etc. its really very hard to block somebody totally.
like i work in a secured environment where they dont want us to surf outside.
and everyday we discover a new way of bypassing the security.
like using a proxy
or sites like or to bypass the security.

however if its as simple as blocking the kids then definately editing host file is the easiest way.

Author Comment

ID: 12257655
Thanks for everybodies input. Its been most helpful.



Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I don't know if many of you have made the great mistake of using the Cisco Thin Client model with the management software VXC. If you have then you are probably more then familiar with the incredibly clunky interface, the numerous work arounds, and …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now