22 Nov

Your hosts file acts as a precursor to dns. You can manipulate requests made to resources outside of your machine with this nifty file. Windows out of the box doesn’t have any records in your hosts file so lets add one.

This is such an important file that if you try to save it with a non-windows text editor your virus scan software might just freak out. My AVG did and tried to quarantine notepad++.

Also, in Vista or 7 you’ll have to “run as administrator” or you won’t be able to save. Run the command prompt as administrator and type notepad.exe. Then open your hosts file to see its full of comments and no actual records. If you add this line at the end of the file and save the change to your system will pick up right away.

Now go to the browser and type in and you will bring up my old wedding website. Now maybe you can see why the security measures are in place on this file. If a virus were to write to this file they could replace with a website of their choosing.

Windows servers have this file too. If you use absolute links in your website you should edit it to redirect your local url to or “localhost” This way you can avoid having to make unnecessary requests to dns. If IIS is configured with domain “bindings” modifiying your hosts file on a developer workstation will allow the developer to go to the website url “” and actually hit the QA server.

Leave a comment

Posted by on November 22, 2010 in Network Admin


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: