We all know that the World Wide Web is composed of HTTP, HTML and URL. After understanding how the Internet works, the definition of the network server and some simple hyperlink concepts in the network, we need to understand the core concept in the Web — URL.

Example: URL https://developer.mozilla.org/en-US/search?q=URLCopy the code

URL concept

URL is a Uniform Resource Locator service. Its address on the Web as a given unique resource contains:

  • Protocol, such as HTTP
  • The domain name
  • The path
  • Query string
  • Internal anchor points of web pages

In theory, every valid URL points to a unique resource, which could be an HTML page, a CSS document, an image, etc.

1. The agreement

The protocol in the URL indicates which protocol is used in the browser. It is usually HTTP or HTTPS.

2. The domain name

The domain name indicates which Web server is being requested. You can also use an IP address like 127.0.0.1.

3. The port

Port Port: GENERALLY, HTTP uses port 80, HTTPS uses port 443, and FTP uses port 21. A machine has a total of 65535 ports.

4. The path

Path Indicates the path of resources on a network server.

5. Query string

The query string refers to the additional parameters provided to the web server. These parameters are separated by an ampersand. The Web server can use these parameters to perform additional operations before returning the resource. Each Web server has its own rules about parameters, and the only reliable way to know if a particular Web server handles parameters is by asking the Web server owner.

6. The anchor

An anchor is an anchor of another part of the resource itself, which is a kind of “bookmark” in the resource. Note, however, that the information after the # is not sent back to the requested server.

DNS

The Domain Name System (DNS) is a hierarchical and decentralized naming System for Internet resources. Simply put, DNS is used to connect domain names to IP addresses. The mapping process from a domain name to an IP address is called a DNS lookup, and a DNS reverse lookup (rDNS) is used to find the domain name corresponding to an IP address.

You can run the nslookup command to query the IP address, for example:

The domain name

Domain names are a key part of the Internet’s infrastructure. They provide human-readable addresses for any available web server on the Internet. Domain names include top-level domain names, labels (components), and second-level domain names.

1. Top-level domain name

Top-level domain names can tell the services provided by the user domain name types, commonly used top-level domain. Com |. Org. | net.

2. Labels (components)

Usually followed by A top-level domain name, the tag consists of 1 to 63 case-insensitive characters, including the letters A-z, the numbers 0-9, and even the “-” (of course, the “-” should not appear at the beginning or end of the tag).

3. Secondary domain name

A domain name can have multiple tags (or components), and there is no mandatory requirement to have three tags to make up a domain name. For example, www.inf.ed.ac.uk is a correct domain name.

Note that:

  • WWW is not the same domain as HTTP
  • .com is a top-level domain name that generally stands for company
  • Such asxiedaimala.comThis type of domain name is the second level domain name but commonly known as the first level domain name
  • Such aswww.xiedaimala.comThis kind of domain name is the third level domain name, but commonly known as the second level domain name
  • A secondary domain name is the parent of a tertiary domain name, which may be different
  • Such asgithub.ioThat is, the subdomain is open to everyone free trial

IP

An IP address is a string of numbers assigned to each device connected to a network that uses the Internet protocol. One domain name can correspond to different IP addresses, and the same IP address can also correspond to different domain names. This is usually used for load balancing network optimization or host sharing.

We can use the ping command to check the IP address, for example:

After use, remember the control+ C interrupt command, otherwise it will keep asking.

© This summary course copyright belongs to the author, reprint need to indicate the source