Very recently I've been involved in setting up a site that uses Google Maps API. When you want to use the API you have to create a key that is generated according to the name of the site but, as of now, the DNSs of the name we want to use are not pointing to our hosting. I could use the IP address of the host where the site is, right? Well, no. It's a shared hosting so requests have to be made by name.
In this case I have to fool my host into thinking that the name we want to use is mapped to an IP without going through public DNS resolution. I could set up a DNS service just to serve this name and forward everything else but it sounds like an overkill, doesn't it?
In GNU/Linux (and I'd dare to say in any POSIX compliant OS) there's a simpler way to do this:
In this file we can map names to IP addresses at will. So this thing I want to do could be performed by adding a single line to my /etc/hosts (not a real example... IP address and name are bogus):
Then I could go to http://mydomain.com and I'd be able to see the site that uses Google Maps, even if the name is not "officially" public.
Notice this trick (surprise, surprise) also works in Windows (which is POSIX compliant, right?), only the file that has to be edited is System32\drivers\etc\hosts