Can I short circuit DNS round robin in a browser?
Under normal conditions the web server is load-balanced across multiple IP addresses. This is served by DNS as a list of IP addresses and picked at random by the browser. In my case I want to force a specific IP address in this list while opening the URL in the browser. Is there a way to force a certain IP address ?
Solution 1:
Edit the hosts
file
That is the most canonical way to force a desired IP address to resolve a DNS name.
Of course, it works only on the same machine used to browse the website, e.g. this solution applies to final user, not web developer.
Obviously, you must resolve the desired IP earlier, and you must make sure the IP does not exit the pool, which likely happens on cloud services.