Server Fault is a question and answer site for system and network administrators. 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

I am having an issue that I hope you guys can help me with.

I currently am running IIS on a Windows 2008 server and it is working properly and displaying the webpage I need it to.

We have a few bad apples here that need a few webpages blocked (one of them being youtube). As of right now, since it is only 3 people, I am editing the host file and have configured the hose file as such:

This works perfectly, they are not able to access

I have created a webpage on IIS that has a warning. When I type in into a web browser it displays the IIS webpage I created. So I edited the host files again and now it looks as such:

It still blocks the webpage but does not display the IIS page I created.

So my question here is, how do I get it to view the IIS webpage?


share|improve this question
up vote 1 down vote accepted

Flush the DNS cache on the client. Entries from the hosts file are loaded and remain in the DNS cache when the OS boots or when the DNS cache is flushed. The DNS cache still has in it for

share|improve this answer
Tried that, im still getting "Server Error 404 - File or Directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable." – Mike K Jan 8 '13 at 17:51
That's a server error not a client error. You need to add a host header for to the web site on the server. The clients are going to, but the server says "that's not me". The host header allows the server to say "oh yes, that's me". – joeqwerty Jan 8 '13 at 17:55
Ok, let me try this and see what happens. It appears I can set more than one hostname for it. Reason I ask is because I need to block 5 more sites. – Mike K Jan 8 '13 at 17:59
I don't have an IIS server here to look at but check the basics: host headers and default document and web site bindings. An HTTP 404 is technically a client error but in your case it's because the server can't find the resource the client is looking for... because the server isn't configured correctly. – joeqwerty Jan 8 '13 at 18:05
Also, run nslookup on the client for and see what ip address it resolves to in order to make sure it's resolving to the correct server ip address. – joeqwerty Jan 8 '13 at 18:07

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.