In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "how to visit Zhihu website directly with IP". In daily operation, I believe many people have doubts about how to visit Zhihu website directly with IP. The editor has consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to visit Zhihu website directly with IP"! Next, please follow the editor to study!
Let's start with the domain name of ping Zhihu, and then we can get the ip of the responding server.
Then we use a browser to access the ip, and the result is as follows
Access was denied.
There is no problem with using ip to visit Baidu, as shown in the figure
When visiting Zhihu, the domain name can be accessed, but ip cannot be accessed. Why on earth is this?
We know that the ip address of ipv4 is very limited, if everyone wants to have a global ip, it is certainly not enough to allocate, do not know what is the global ip can see my article: talk about NAT: what? What the heck are global IP and private IP?
Therefore, when many websites are released, it is possible for several domain names to share a CDN server.
Explain a little bit what CDN is: the CDN server can be said to be a cache server. When we want to visit the resources of a website, if the server of the website is far away from us, then the response speed will be very slow. In order to make the response faster, we can distribute the resources in various places, and then when we respond to the client, send the resources closer to the client to him.
When we visit Zhihu with a domain name, the CDN server can know the resources of which website you want according to the visited domain name, and then return the corresponding resources directly to you.
But when you use the public network ip to access, because the public network ip of a CDN server corresponds to multiple domain name websites, he does not know which website resources you want, that is to say, when you use 118.89.204.192 to visit Zhihu, the CDN server does not know whether you want to visit zhihu.com, or access a.com or b.com, so he simply made it clear and refused your access directly.
Some people may ask, after I enter the domain name, the DNS server automatically parses it into the corresponding ip for me. When I visit Zhihu, I still use ip to access it, which seems to be no different from ip access.
Indeed, when you visit, the DNS server will help me resolve the domain name to ip for access. The reason why the CDN server can detect the corresponding domain name is as follows:
When the client accesses Zhihu with a domain name, the DNS will resolve to the corresponding ip to access the CDN server, and then the CDN server can obtain the source domain name of the ip according to the SNI mechanism, and then return the corresponding resources.
Here is a slightly simple and rough explanation of the SNI mechanism: this mechanism is mainly used to solve some problems caused by a server corresponding to multiple domain names. Through this mechanism, the server can know in advance (no link has been established) the website that the client wants to visit. I have prepared an article for you for more details: https://blog.csdn.net/firefile/article/details/80532161
After knowing that Zhihu can be accessed with a domain name, but not with ip, let's talk about Baidu.
Why can Baidu ip and domain name be accessed?
This is actually very simple, that is, Baidu uses the CDN server, which only corresponds to a website domain name. To put it bluntly, Baidu has money!
Finish
Print_r ('order something nice!')
Var_dump ('order something nice!')
NSLog (@ "Click it!")
System.out.println ("order something nice!")
Console.log ("order something nice!")
Print ("order something nice!")
Printf ("order something nice!")
Cout
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.