Changing domain IP address without modifying DNS
In such cases one option can be to use a secondary domain or a subdomain pointing to the new server and then complete testing.
Sometimes, applications are hard coded to use a specific domain name, thereby leaving no alternative but to test with the domain name only.
One solution to this problem is to modify the local hosts file. Thankfully Windows (from the early versions) uses a file called “hosts” (without any extension) to map domain names to ip addresses. This file contains no mappings by default but can be used to setup local domain-up mapping. Any mapping set here will only affect this system and will not cause any network wide changes.
This file is located in “c:windowssystem32driversetc” folder where “c” refers to the root windows drive. This file is plain text and can be edited in notepad.
A sample mapping would be (one mapping per line)
By adding this line, any DNS queries to www.1nine.com will be translated to 192.168.1.1 instead of the mapping in public DNS servers.
Remember to remove this mapping after testing. Forgetting to remove this mapping can cause some serious trouble later. I have spent hours debugging application problems because of leftover mapping from previous test runs.
- Tbot: The Self-Balancing Transformer Robot
- Best Concise Linux System Administrator’s Guide (SAG)
- Color Conversions
- Introduction to OpenCV
- Setting up IIS 7.5 and Apache on same server
- Using HTTPWebRequest & HTTPWebResponse to automate web browsing
- My experience running PHP on IIS 7.5
- To RAID or not to RAID
- Who is WHOIS?
- Do all versions of OpenCV run at the same speed?