Tuesday, January 15, 2013
How to assign a name to an ip adress/redirect an ip adress
[Non-edited version] By Subhadeep Das
It often happens after creating a webserver, that, you have to type the ip iddress in the place reserved for URL in a web browser. It is cumbersome and appears very much annoying to people like us who are familiar using a domain name for a web server instead of ip. This can be resolved by adding the ip to a DNS server but in order to do that we need to send request to DNA administrator. The alternative and easiest way to solve the problem is to modify the "hosts" file of the Operating System of the local machine.
The "hosts" file can be found at computer/local Disk C/windows/System32/drivers/
hosts (I don't know where it is located in linux :(, sorry friends!!! )
just add the line ip_address blank(or tab) desired_name_to_replace ip.
e.g- 220.127.116.11 Subhadeep.com
and you are done. from next time onwrds you just type Subhadeep.com instead of 18.104.22.168 and the same webpage will be open.
But, wait friends, the step to edit the hosts file is not that easy. You won't be able to edit web file if you do not access the hosts file as Administrator.
To do it, follow the steps-
1)go to start menu
2)expand all programs
3)go to accessories
4)type notepad at search
5)right click on notepad
6)click on "Run as Administrator"
7)a blank notepad will be open, now go to file of notepad window
8)go to open
9)follow the path to hosts file, i.e go to local Disk C/windows/System32/drivers/
11) add 22.214.171.124 Subhadeep.com
12) save the file
Do it. You owe me a treat friends. :D