I need help understanding how the Hosts file resolves URLs

This is the correct format for an ip. An ip rather strictly has to follow the ipv4 or ipv6 protocol. These are hard to remember and as such, we mostly use URLs when browsing. Setting up a local hosts file is the first place internal dns resolution checks to see if it's something to be resolved internally, this is great for a testing environment. However, in production you need a static, public-facing ip address.

What exactly is the problem? Have you pushed your code to the production branch? A big kicker (least has been for me) is remembering to disable /etc/hosts after testing locally, then trying to hit the live server but still seeing the old page lol

/r/AskProgramming Thread Parent