1. What is the URL

The full name of a URL is Uniform Resource Locator (Uniform Resource Locator). The concept of URL goes hand in hand with the concepts of HTML, HTTP, etc., and is often (mistakenly) substituted for each other as synonyms.

The role of a URL is “the address on the Web of a given unique resource” [2]. “In theory, every valid URL points to a unique resource. This resource can be an HTML page, a CSS document, an image, and so on. This is the original MDN, which is quoted here. In other words, resources can refer to everything that exists on the Internet, such as web pages, images, etc., and the purpose of the URL is to assign an address code to each resource.

Urls are made up of many parts. Here’s a sample URL to illustrate:

http://www.example.com:80/path/to/myfile.html?key1=value1&key2=value2#SomewhereInTheDocument
Copy the code
  • scheme: The corresponding part ishttp://, which specifies the URL to be usedProtocol.
  • authority: The corresponding part iswww.example.com:80, that is, of the urlDomain and Port. The domain name and port are separated by colonsauthority,www.example.comIs a domain name,: 80Is the port. Because the default port of the Web address is80Or (HTTP)443(HTTPS). Therefore, the port is omitted. In addition to the domain name, you can also use an IP address to replace the domain name.
  • Path to resource: indicates the resource path. The corresponding part ispath/to/myfile.html. In the early days of the Web, paths like this represented physical file locations on the Web server. Today, it is primarily an abstraction handled by a Web server without any physical reality.
  • Parameters: parameters. The corresponding part is? key1=value1&key2=value2“Usually begins with a question mark. Arguments are usually in the form of key-value pairs, such as herekey1=value1, multiple parameters to&Separated. It is passed to the server for additional operations.
  • anchor: anchor point. The corresponding part is#SomewhereInTheDocumentUsed to jump between different parts of an article. It is worth noting that the part following the # (also known as the fragment identifier) is never sent to the requested server.

Through the above analysis, we can easily read the browser that a long string of addresses like garbled code.

2. What is DNS?

The full Name of the DNS is Domain Name System. “Is a series of industry standard protocols including TCP/IP, simultaneously DNS client and DNS server for computers and users to provide computer name to IP address mapping name resolution service” [3]. The most important function of DNS is to map domain names to numeric IP addresses.

For more information on how DNS works, read IBM’s article (in English).

3. How to use nslookup?

This command can be used to diagnose DNS structures. Enter the domain name directly after that. As shown in the figure below:

4. Explain IP and ping

An IP address is a string of numbers assigned to each device connected to a network that uses Internet protocols. There are IPv4 and IPv6 IP addresses. Before the widespread use of IPv6, IP was basically equivalent to IPv4. An IP address is a unified address format that assigns a logical address to each network and host on the Internet to mask the differences in physical addresses.

The ping command is used to check whether the local PC is properly connected to the Internet. The following is an example:

5. Domain name description

A domain name is the address of a website. Domain names are used in urls to identify which specific sites a server belongs to.

Take an example to illustrate the classification of domain names. Here’s an example from MDN:

Domain names should be read in plaque order: from right to left. From right to left, it is divided into these parts:

  • TLD: Top Level Domain, which can be used to indicate what the function of the url is, or which country or region it belongs to. For example,.acOn behalf of academic institutions,.govOn behalf of government organizations,.eduIs for colleges and universities or educational institutions..cnOn behalf of China,.hkRepresenting Hong Kong and so on.
  • Label: Divided in the picturelabel1andlabel2, followed by TLD. The tag consists of 1 to 63 case-insensitive characters, including the letters A-Z, the numbers 0-9, and even the symbol “-” (of course, “-” should not appear at the beginning or end of the tag).

Note: the WWW is a legacy of history and of little use.

References

  • [1] What is a URL? (English)-MDN
  • [2] What is URL (Chinese) -MDN
  • [3] Domain Name System (DNS)
  • [4] DNS – IBM
  • [5] DNS – AWS
  • [6] nslookup – Microsoft
  • [7] IP-MDN
  • [8] Details of the ping command
  • [9] domain name – MDN
  • [10] Domain name description -MDN