Let’s talk about domain names and domain name resolution

Let’s talk about domain names and domain name resolution

When a user enters a domain name in the browser, the browser will send a query request to the local DNS server to seek the IP address corresponding to the domain name. If the local DNS server does not have the IP address of the domain name in its cache, it will query the root domain name server and continue the query step by step until the IP address corresponding to the domain name is found.

1. Enter the URL into the browser

as follows:

  • Baidu: http://www.baidu.com
  • Taobao: https://www.taobao.com
  • Alibaba: https://ali-home.alibaba.com

So how to correctly recognize these URLs?

2. Protocol type

In addition to the common HTTP and HTTPS protocols, there are many other types of protocols. For example, FTP (File Transfer Protocol) is a protocol used to transfer files between clients and servers. Using the FTP protocol, various files, such as software, music, videos, etc., can be transferred between computers.

A format like ftp://xxx.xxx.com refers to the URL format used in the FTP protocol. By adding a protocol type to the URL, such as ftp://, you can tell the browser to use a specific protocol type to access the website.

3. The difference between http and https

Compared with the HTTP protocol, the HTTPS protocol has an extra "s", which represents the word "Secure".

HTTPS uses the SSL/TLS protocol to encrypt data and ensure security and privacy during network transmission. By using public and private key encryption, HTTPS can effectively prevent data eavesdropping, tampering and forgery. This enables data to be transmitted more securely when interacting with sensitive information, such as online payments, logging into accounts, etc.

HTTPS provides more advanced security than HTTP and provides a more reliable data protection mechanism for users and websites.

4. Domain name

Among the above URLs, baidu.com, taobao.com, alibaba.com and csdn.net are domain names. Domain names are generally related to company information, and the shorter the better, because they are easier to remember.

A domain name is an English or a number or a combination of English and numbers plus a suffix. Of course, there are also Chinese domain names.

Domain name suffix and its meaning:

  1. .com (Commercial): This is the most commonly used domain name suffix for commercial websites.
  2. .cn (China): represents China. Typically used for websites targeting the Chinese market.
  3. .net (Network): Network-related domain name suffix.
  4. .org (Organization): domain name suffix of the organization
  5. .gov (Government): Domain name suffix provided by government agencies.
  6. .edu (Education): Domain name suffix provided by educational institutions

5. Second-level domain name

After a first-level domain name, we can add custom strings to create countless second-level domain names.

For example, by adding ali-home. in front of the domain name, we can create a second-level domain name named ali-home.alibaba.com.

This method can create multiple different second-level domain names under the same first-level domain name. Each second-level domain name can point to different servers or have different functions. This flexibility and scalability makes it easier to manage and organize domain names, allowing independent second-level domain names to be assigned to different sub-departments, projects or functions as needed.

6. Domain name resolution

Domain name resolution refers to resolving domain names into corresponding IP addresses.

For example, www.baidu.com resolves to 14.119.104.254.

All domain names must be resolved to IP addresses. This work is completed by the DNS root server (Domain Name System). There are currently only 13 DNS root servers in the world, and they are distributed in different countries.

The data center seen under the sea in The Wandering Earth is the DNS root server. Only by activating the root server can the global Internet be connected.

Every server accessed through the Internet has a corresponding IP address, and domain names and IP addresses have a one-to-one correspondence. However, we usually access the server through the domain name rather than directly entering the IP address. This is because domain names are easier to remember and recognize, and are more in line with human habits. If you want to access the server, you must first obtain the IP address corresponding to the domain name through domain name resolution, and then you can establish a connection with the server for communication.

When a user enters a domain name in the browser, the browser will send a query request to the local DNS server to seek the IP address corresponding to the domain name. If the local DNS server does not have the IP address of the domain name in its cache, it will query the root domain name server and continue the query step by step until the IP address corresponding to the domain name is found. Then the local DNS server returns the IP address to the client. Once the client owns the IP address, it can establish a connection with the corresponding server through the IP address for data communication.

Commonly used DNS server addresses are:

  • 114.114.114.114
  • 8.8.8.8
  • 8.8.4.4
  • 9.9.9.9
  • 149.112.112.112

7. Conclusion

Remember two sentences:

Multiple different second-level domain names can be created under the first-level domain name

Resolve domain names to IP addresses through DNS root servers