Updating hosts file multiple servers
Updating hosts file multiple servers - on the dating of polycarp
We provide the following how-to for your convenience only.
With any domain name you can actually setup any number of host names like foo.mydomain.com, and cheeseburger.are all valid host names you could setup for your domain.Historically there have been some conventions for naming hosts within a domain such as the web server and mail.for the email server and so on, but these are just arbitrary, you can use any host name there is no rule about using www or not, its just a convention and people are kind of used to seeing www for web sites.But you can have mutiple web sites like web1.mydomain.com, web2.mydomain.com, test.etc.Host names are resolved to ip addresses by DNS (Domain Name Servers), but before your machine checks the DNS servers it looks in its own hosts file and if it finds a mapping there it uses that instead of a DNS server.On a local network your IT dept may have setup a local DNS server to resolve names of machines on the local network to ip addresses on the local network.On Windows the hosts file exists at C:\Windows\system32\drivers\etc folder the file is named hosts and it has no file extension but it is just a text file.
To edit it, you need to right click on Notepad and choose "Run as Administrator", then browse to C:\Windows\system32\drivers\etc You'll need to change the file extension in Notepad to browse all files instead of as shown here: Then you can add your own custom host names there and map them to the loopback address 127.0.0.1 You'll see that is exactly how the hostname "localhost" works, it has a mapping in your hosts file.In IIS when you click the web site node then click the "Bindings" link on the right side of the page it opens a dialog where you can assign a host name and/or and ip address.Note that for local testing host names can be arbitrary, they don't need to have a domain name portion, so it can be a single segment like mojotest1 as shown above, or you can use segments like com if you prefer or home, or The Internet has a lot of DNS servers and typically the ISP that you use to connect to the internet assigns DNS Server(s) to your network card when it assigns you an ip address, and those DNS servers in conjunction with other DNS servers on the Internet resolve the names to ip addresses so your computer can connect to them.But as we mentioned above, before checking with DNS servers your machine will look in its hosts file for a mapping for the host name.The loopback address doesn't even require that there is an actual network card on the machine. In the above example we are just mapping additional arbitrary host names to the loopback address.