What happens when you enter a URL in a browser

Source: Internet
Author: User
Tags domain name server domain server

This topic does not have the so-called complete correct answer, this topic can let you go down at any point in any way, as long as you are familiar with this point. Here is an approximate flow:

    1. The browser looks for the IP address that corresponds to the input URL to the DNS server.
    2. The DNS server returns the IP address of the Web site.
    3. The browser establishes a TCP connection on port 80 based on the IP address and the destination Web server
    4. The browser gets the HTML code for the requested page.
    5. The browser renders the HTML within the Display window.
    6. When the window is closed, the browser terminates the connection to the server.

The most interesting of these is the 1th and 2nd steps (domain name resolution). We enter the URL (domain name) is an alias of the IP address, within a DNS, a domain name corresponding to an IP address. The Domain Name System (DNS) works by matching the domain name with its IP address. DNS is distributed and has hierarchical relationships.

Although a domain name server only records a small subnet host name and IP address, but all the domain name server to work together, you can be the entire network domain name and their IP address. This means that if a domain name server cannot find the IP address of a request domain name, it will make a request to the other domain name server to look for.

is actually a DNS parsing process:
The first step: The client presents the domain name resolution request and sends the request to the local domain name server.

Second step: When the local domain name server receives the request, first queries the local cache, if has the record entry, then the local domain name server directly returns the result of the query.

Third step: If the local cache does not have this record, the local domain name server sends the request directly to the root name server, and then the root name server returns the address of the primary domain server to the local domain name server for the domain (the root subdomain) of the query.

Fourth step: The local server then returns the domain name server to send the request, and then accepts the requested server to query its own cache, if there is no record, returns the address of the associated subordinate domain name server.

Fifth step: Repeat the fourth step until you find the correct record.

Reference:

Http://www.cnblogs.com/lichenghan/p/4019370.html

Http://www.cnblogs.com/panxueji/archive/2013/05/12/3073924.html

Http://www.cricode.com/2398.html

http://www.berlinix.com/net/from-url-input.php

What happens when you enter a URL in a browser

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.