> For the complete documentation index, see [llms.txt](https://liuyang89116.gitbook.io/system-design/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://liuyang89116.gitbook.io/system-design/other-questions/url.md).

# What happened after you input the url in the browser?

> Ref: <https://zhuanlan.zhihu.com/p/133906695>

## input url

* when you are typing, browser starts checking history, bookmark to find possible matches.
* give you intelligent auto-complete
* some browser like chrome will even load pages from cache

## [lookup ip address of a given domain](https://en.wikipedia.org/wiki/Domain_Name_System#DNS_resolvers)

* browser will first check local hosts file whether it has the rules of this domain. If yes, directly use ip address from local hosts file;
* a DNS resolver queries a DNS server that provides a record either for which the server is authoritative, or it provides a partial result without querying other servers.&#x20;
* In a recursive query, a DNS resolver queries a single DNS server, which may in turn query other DNS servers on behalf of the requester. For example, a simple stub resolver running on a home router typically makes a recursive query to the DNS server run by the user's **ISP**.

![](https://2407442552-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lpv9LvHzpublmUWisvz%2Fsync%2F4839a9a66fccb37ccd1933d5436bbf42f738f9c8.png?generation=1629683678732459\&alt=media)

## browser send HTTP request to web server
