Is there a way to change our website address into a domain name. E.g - I am creating a intranet and just copying the server IP and port everywhere to open the web page. It looks odd to copy pasting the IP, so what should I do to give a domain name instead of IP address?
Try editing the hosts file (
C:\Windows\System32\drivers\etc) and mapping http://xxx.xxx.xx.xx:8082/ to an address such as 'ArunsComputer` Keep in mind, that this would have to be done on all of these computers. There is a way to use a DNS server to do this, but editing the hosts file seems to be the simplest.
You would add a line like this to the hosts file:
To edit the hosts file, follow these steps:
- Open start, and in the search bar type 'Notepad'
- Don't hit enter, right click, and select 'Run as Administrator'
- Go to file, and open the C:\ Drive.
- From there go to the Windows -> System32 -> drivers -> etc (or just
paste this into the address bar
C:\Windows\System32\drivers\etcand hit enter)
- The folder should be empty. Select the dropdown menu that says (Text Documents *.txt) and select 'All files'
- Then, under the last entry in the file, add your IP and name you
want to use, like
- Save the file, open up IE, and type in the name that you used. It should work.
Depending on your operating system look for the host file (called like this on windows, linux and mac but resides at different locations). You can add entries to it. like this:
If you want the changes work in the whole network and not just on one computer you have to set up a local DNS server, edit its host file and set the computers to use this as default DNS.
If you want the adress to be accessible via the internet you have to buy a domain and let it point to your IP adress. This differs a bit depending on your country and if you have a static IP or not. In the later case you'd have to use a dynamic IP service like eg no-ip.
As you have a DNS server, you can add a record for the web server. As you do not indicate OS, we cannot provide details. However, this is for Windows 2008 and may assist. WIN2008 DNS