If you wish to connect to a machine by hostname (which is not registered in DNS (Domain Name Server)) you need to add <IP> <Fully Qualified Hostname> <Hostname> in Hosts file.
Adding an entry in Non Vista (Microsoft O.S. XP, 2000, NT) is pretty simple. Open hosts file (using text editor like notepad, wordpad..) and hostname entry in above format like

192.168.0.1 myMachine.myDomain myMachine

Location of hosts file in windows is C:\Windows\System32\drivers\etc (where C is drive in which you installed operating system)

Location of hosts file in Unix/Linux is /etc

Change hosts file in Windows Vista

If your O.S. is windows vista, it won’t let you save your hosts file if you don’t open file editor (like notepad) with Administrator Privileges

When i go to save the changes a window pop ups and says:The creation of this file cant be done(it doesnt say that but i translate it because my pc is in greek)and a little bit more down it says:Be sure that the destination in C and the name of the file are correct.

I dont know what happenned about few days later i could change the hosts but yestarday i couldnt.

Did you open notepad (any tool you are using to edit file) as administrator ?

Right click on file and under properties check if this file (hosts) is not write protected .

Also as suggested by Famy, in comment section disable user access control and reboot vista machine

Vista suck said,

in August 27th, 2008 at 4:52 am

Ok i did it ty for help

Vista suck said,

in August 27th, 2008 at 5:07 am

ty = thank you !!!

kunal198916 said,

in September 29th, 2008 at 12:37 pm

i want to open any other website by adding the ip add and the domain name or the website name but instead of opening it , it blocks the website i.e the name of the website eg:- 209.&&.$$.$$ http://www.download .com suppose the ip add is of google then when ever i type download.com google should come up but that does’nt happens , it just blocks download.com