Edit hosts file on Windows 7


If you want to redirect ip addresses and/or names instead of using DNS for those specifc lookups, you need to edit your hosts file.

Some reasons for doing this: Your dns server doesn’t know about the host. This can be completely normal for internal networks where you may or may not have DNS. You could have a static IP address that doesn’t resolve to the particular name you would like. In this case you disagree with your DNS server and using the host file, you redirect it to whatever you want. Another reason might be to avoid accessing a specific server altogether. You can redirect the lookup of a valid name in DNS to another ip address, localhost for instance. This works because hosts lookups supersede DNS queries by default. If you run a web server you can host the files that are trying to be accessed to avoid accessing the defaults.

But whatever the reason, you want to edit the hosts file. This goes for just about all versions of windows — the file you are looking for is:

%systemroot%system32\drivers\etc\hosts

Since this is a system area, normal users will not be able to edit the file. So open it in notepad under “Run as Administrator”

To see this area you may need to enable the show-hidden-files setting. This is one of those bad settings that irritate me, but not nearly as much as hiding file extensions.

Explorer->Tools->Folder Options->Show hidden files, folders,and drives


Posted on January 9th, by admica in microsoft.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">