hosts file in windows

in xp: \windows\system32\drivers\etc\hosts, playing the same role as /etc/hosts in linux

with it you can block some web site entry: 127.0.0.1 www.***.com
with it you can setup intranet shortcut: 192.168.1.4 mybaby
with it you can intranetly visit your www server: 192.168.1.x www.mysite.net (or 192.168.1.1 router)
or internetly visit your www server: 12.34.56.78 www.mysite.net

I use it during my domain transfer. By mistake, domain “www.softbeam.net” is out of order for 5 days, which would otherwise prevent myself from blogging on my wordpress site.

This kind of IP based mutual recognition also means that you even don’t need a real domain name. Just have ips of your circle of boxes, or together with your friends, pointing to the computer with any fake domain name like “microsoft.com”, then you can have, or with your friends, your own “microsoft.com” πŸ™‚

One thought on “hosts file in windows”

  1. when you got your domain transfer done and A Name, C Name pointing correctly, don’t forget to comment them; otherwise, it will slow you down or make you unable to connect in case of 192.168.1.*.

Comments are closed.