Assign temporary Domain Name to IP adress locally

I will briefly explain how to temporarily set a domain name to an IP address locally in the computer or LAN. The temporary assignation of a domain name could be useful when you are working on developing a web page that has not been released to the public yet or does not have a legit domain name.


In the computer: (Windows)

Open the note path and run it as administrator, click open file and follow this directory path: 

LocalDisk(C:)/ Windows/ System32/ drivers/ etc

You will see 5 files as default, click on hosts and add the IP address as well as the domain name.



Example:

192.168.254.23 example.com

Once done, save the file and close it, if the name of the domain matches any other already searched before, the computer will open the legit one, in this case, you need to either clear the cache or specifically delete that domain name from the computer cache.

In the router: (LAN)

Search the default gateway number on your internet browser to log in into the router’s configurations, afterwards add the IP address number and the domain name in the ADVANCED/DNS section.