You can use this technique to test how your web application response to requests with fully qualified domain name, when you don't actually buy any domain name. Say I have a real server with real IP:8.8.8.8. I want to know if my web application render correctly when user browse to [appname].myDomain.com. Add the following entry to the host file (windows\system32\drivers\etc)
8.8.8.8 appname.myDomain.comIt works well for awhile. Someday, some one come & buy myDomain.com, point it to another server say DomainMarket.com. The technique still work if your Internet does not goes through a proxy server (e.g at school or many businesses). when your browser behind a proxy, the proxy perform DNS lookups for you, then the HOSTS file is ignored. Ping in command line to appname.myDomain.com still resolves to 8.8.8.8, while your browser still resolves to DomainMarket.com
Hope this can save someone sometime.
Tai -