Many of us would have used a local webserver for designing websites or for previewing. This is where the 'localhost' comes. We always give http://localhost or http://127.0.0.1 to tell the browser to take the files from the local web server instead of going into the internet. How and where to change that name, if u wanted to make the localhost as .com or .net, whatever.
Just edit the file named hosts under the location
'C:\WINDOWS\system32\drivers\etc\hosts' (assuming C: is the drive where u installed windows)
A default hosts file will look like this
# Copyright (c) 1993-1999 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 184.108.40.206 rhino.acme.com # source server # 220.127.116.11 x.acme.com # x client host 127.0.0.1 localhost
This file can also be used to block unwanted sites. U can put the sites here that u don't wish to see.
If you go to a particular URL in the browser the OS will check the hosts file whether any specific address has been mapped to that site.If yes it will load that,if not it will fetch it from the web. If you give the above line in the hosts file, whenever u goto the site 'dont-see-this.com' it will point the browser to the address 127.0.0.1 which is your localhost.
(The above technique is used in 'spybot search and destroy' when u give the immunize option)