This is a very interesting thing, through which we can better understand the HTTP request.
Entering a URL in the browser's address bar goes through the following steps:
The first step: Domain name resolution---Browser search its own DNS cache, if there is a cache, then see if there is no expiration, if not expired, that is, with this IP, if expired, the process is over.
Note: Check the Google browser's DNS caching method-enter chrome://net-internals/in the address bar #dns so you can see the DNS cache in your browser.
The second step: if the browser does not search its own DNS cache or its own DNS cache has been invalidated, then it will search the operating system's own DNS cache, if found and not expired, then the search process is over, otherwise proceed to the next step.
Step three: If the browser does not search the system's own DNS cache, it will read the local host file (local C drive).
Fourth step: If host is not available, the browser initiates a DNS system call to the local carrier for the DNS server request. The local runtime then looks at its own cache, and if not, it goes to the root domain, and if not, requests to more specific domains.
Reference: http://www.imooc.com/video/6712/0
What happens when you enter a URL in the address bar of a browser