Analysis of URL

1. What is a URL?

The full name of the URL is Uniform Resource Locator (Uniform Resource Locator).
Url is a uniform resource locator, a concise representation of the location and access method of resources available on the Internet, and is the address of a standard resource on the Internet.
Each file on the Internet has a unique URL, which contains information indicating the location of the file and how the browser should handle it.
The url is essential for netizens to find resources, obtain information, use e-mail communication, online communication, etc. in the Internet knowledge ocean.
It was originally invented by Tim Berners-Lee as an address for the World Wide Web. Now it has been compiled by the World Wide Web Consortium as the Internet standard RFC1738.
The formula for the composition of the World Wide Web invented by Sir Lee: www = URL + HTTP + HTML, URL is an indispensable part of the World Wide Web.

2. What parts does the URL contain and what does each part do?

The composition formula of
URL is as follows: URL = protocol + domain name or IP + port number + path + query string + anchor

For example, https://www.baidu.com/s?wd=hello&rsv_spt=1#5, where https is the protocol,
www.baidu.com is the domain name, the port is not written here, and the default is 443 (the default for the https protocol is 443 , Http protocol defaults to 80), s is the path, wd = hello & rsv_spt = 1 is the parameter, and after the domain name IP + port? Symbol is the parameter, when # symbol, it is the anchor, such as # 5.

  • The role of the HTTP protocol: specify the format of the client request and the format of the server response. Note that HTTPS is based on HTTP, but with an additional layer of security and confidentiality protocol.
  • Domain name or IP: Look for a server with a unique identifier in the Internet, that is, a computer.
  • Port: After finding the server, determine which port on the server to send the content to, that is, the application. Path: Tell the application on the server which resource I want to find.
  • Query string: Pass some value identifiers, and the application on the server performs different actions based on these value identifiers.
  • Anchor: If the URL has an anchor, then the request will not be sent to the server, but will be processed by the browser itself, and it will be located on an element with id 5, taking # 5 as an example.

3. What is the role of DNS and how to use the nslookup command

The full name of DNS is: Domain Name Server, which is the domain name service.
The role of DNS is when you enter a web address, such as baidu.com, your computer will ask the DNS server provided by your network provider to ask what IP baidu.com corresponds to.
Use nslookup baidu.com to ask Baidu's IP address.
The first Address under the picture is the DNS server corresponding to my network, and Addresses is the IP corresponding to baidu.com.

Insert picture description here

4. What is the role of IP and how to use the ping command

Without IP, we cannot access the Internet. The full name of IP is Internet Protocal (Internet Protocol).
IP mainly stipulates two things:

	1. 如何定位一台设备
	2. 如何封装数据报文,以及跟其他设备交流

As long as you are on the Internet, you have an independent IP. The IP is equivalent to your home address. After you know the address of your home, the postman can accurately deliver the courier to your home, or deliver the courier from your home. Send it, the courier here can be regarded as the data in the network, and the postman can be regarded as the network.
The ping command is to ping a domain name or ip, and then the other party gives us a response. If the other party gives a response, it means that the network between us is unobstructed and can communicate, as shown below.

Insert picture description here

5. What are domain names and what types of domain names are there?

The domain name is an alias for IP, which is convenient for everyone to remember, because a series of numbers is not easy to remember.
The domain name is mapped to the IP through DNS, so when you access the domain name, in fact, you are converted behind the network, and the final access form is still accessed by IP.
Knowledge points:

一个域名可以对应不同的IP,例如一个域名绑定 华中、华东、华北,华中的用户就访问华中的IP,以次类推,
这个叫做负载均衡,防止一台机器扛不住。
一个IP可以对应不同域名,这个叫做共享主机。

There are three types of domain names

  • com is the top-level domain
  • baidu.com is a second-level domain name
  • www.baidu.com is a third-level domain name

.com = company The company generally registers this. org = non-profit website The
second-level domain name and the third-level domain name may not be the same company. For example, the URL of github is https://github.com, which is a second-level domain name,
but it Give the third-level domain name to each user to use, your own github is your username.github.com.

Published 38 original articles · praised 17 · views 9015

Guess you like

Origin blog.csdn.net/cainiao1412/article/details/100566065
URL
URL
URL
URL