How to open a website? What is the domain name of the website?
The previous article talked about the working principle of the browser. If you have not seen it, netizens suggest to read it first: What is the working principle of the browser? How is the web page displayed?
Edit search image
Today, I will talk about how the domain name address of a website is bound to an IP address. If you don’t know what an IP address is, you can take a look first: Knowing an IP address in one minute, the Internet is really not an extrajudicial place, I urge you to be cautious Be cautious
When a browser generates an HTTP message, how does it send it? At this time, we need to use our operating system to help the browser to send the message, but before sending, we also need to know the IP address of the destination host, that is, the IP address of the website server to be accessed.
How to find the IP address of a website based on its domain name address?
Edit search image
The Internet and the local area network within the company are designed based on the idea of TCP/IP, so let’s first understand the basic idea of TCP/IP.
TCP/IP consists of some small subnets connected by routers to form a large network. The subnet here can be understood as several computers connected by a hub, and we regard it as a unit called a subnet.
Edit search image
When subnets are connected by routers, a network is formed.
The network determines the communication partner by IP address, so it is impossible to send a message to the other party without knowing the IP address. You may think, since IP address communication is required, why not fill in the IP address directly in the browser to access it?
In fact, some websites can be accessed directly by using IP addresses without using domain names, but it is difficult for you to remember this IP address, because IP addresses are like a string of phone numbers, which are very long and difficult to remember. Compared with IP addresses, domain names are difficult to remember. The address is much easier to remember.
Some people will say, why not use the domain name to access the server directly? And how to use the IP address to bind the domain name?
Because there are many routers on the Internet, these routers need to determine where to send data based on different IP addresses. The length of the IP address is only 32 bits, that is, 4 bytes, which is very short compared to the domain name, so the router is very simple to process, and the domain name can be up to 255 bytes, which will increase the burden on the router. , resulting in lower data transmission efficiency.
The method of querying the IP address is very simple, just ask what the IP address of the website domain name of the nearest DNS server is, and the DNS server will answer that the IP address of the server is xxx.xxx.xxx.xxx.
Edit search image
What is a DNS server? DNS server is actually a domain name registrar. You can think of it as a place to store domain names and IP bindings. All companies or individuals who need domain name addresses need to apply to the domain name registrar , and this domain name needs to be purchased with money. , Now the mainstream domain name providers in China include Alibaba Cloud, Zhongshu, Western Digital, Tencent Cloud and so on.
Edit search image
Different domain names have different prices, and the shorter the domain name, the more expensive the domain name that is easier to remember.
In China, if the domain name applied for is to access the domestic website server, it needs to be filed first , that is, you need to go to the communications authority where you are located to do a domain name filing. This filing has an entry and filing method at the domain name registrar. , for example, Alibaba Cloud has a domain name filing service, but it requires money, so you don’t need to spend money on filing your own.
If your domain name is to access a foreign server, you don’t need to record it, but you can’t do illegal or criminal things.
Finally, after you purchase a domain name, the general domain name registrar will provide a website background, and you can bind the IP address you need to bind on the background provided by the registrar, thus realizing the binding of the domain name and the IP address. A domain name can only be bound to one IP address, but multiple different second-level domain names can be bound to multiple different IP addresses.
For example, if you apply for a domain name it.com, then you can use www.it.com to bind IP: 204.22.33.33, you can also use blog.it.com to bind IP: 204.22.33.32, you can also use: it.it .com bind IP address: 204.22.33.34 and so on.
When your website domain name address is bound to an IP address, other users can access your website through the domain name address.
Similarly, the user’s computer can access the website after obtaining the IP address bound to the domain name address of the website to be accessed.
Edit search image
If you do not know how to apply for a domain name, record a domain name, or bind a domain name, please follow me and send me a private message.
Welcome to follow me and learn more computer knowledge!
Want to know more exciting content, come and pay attention to IT Archives Bureau
Latest News about website trends and design skills|Websight