The composition of the URL

Uniform Transfer Protocol (URL) = Protocol + Domain name or IP address + port + path + Query parameters + anchor



(Note: Photo from Hungry Man Valley)

  1. HTTP or HTTPS;
  2. IP is used to locate a device. A domain name is another name for the IP address. An IP address can correspond to different domain names, and a domain name can correspond to different IP addresses.
  3. Port: A server can provide many services. Each service has a number. This number is called the port number.
  4. Path: requests different content on the same device;
  5. Query parameters: different content on the same page;
  6. Anchor point: the same content is displayed in different positions; Anchors do not support Chinese and will not be transmitted to the server

DNS function, nslookup how to use

DNS (Domain Name Server) Functions of a Domain Name Server: A Domain Name corresponds to an IP address through the DNS

Process:

  1. The browser will ask the DNS server provided by telecom for the IP address of the site
  2. Telecom will answer this IP (nslookup lookup IP)
  3. The browser sends a request to port 80/443 of the corresponding IP address
  4. The request is to view the homepage of this website
  5. The server sends requests on port 80/443 by default
  6. You can view the ports in developer tools

You can use NSLookup to view the IP address of a website

What is the function of IP? How to use the ping command

  1. Locating a Device
  2. Encapsulated data message
  3. IP addresses are classified into internal IP addresses and external IP addresses. The external IP address is not fixed, if the restart will change the IP address; The Intranet IP address is assigned by the router itself, and the IP address of each device is different.
  4. You can run the ping command to view the corresponding IP address

For example, ping Baidu.com can find the CORRESPONDING IP address of Baidu when I visit

Nslookup and ping

What are domain names and what are their categories

A domain name is another name for IP

  • Com is a top-level domain name
  • Xxxx.com is a level 2 domain name.
  • www.xxxx.com is a level 3 domain name (commonly known as level 2 domain name). The WWW is redundant