आज का प्रश्न और उत्तर सत्र हमारे पास सुपरयूसर की सौजन्य है - स्टैक एक्सचेंज का एक उपविभाग, क्यू एंड ए वेब साइट्स का एक समुदाय संचालित समूह।
फोटो कोरी एम। ग्रेनेयर (फ़्लिकर) की सौजन्य।
प्रश्न
सुपर यूज़र रीडर जोसेफ ए जानना चाहता है कि वेब सर्वर कैसे बता सकते हैं कि आप सीधे आईपी एड्रेस एक्सेस का उपयोग कर रहे हैं या नहीं:
Some web servers, when accessed using their IP address, return an error that direct IP address access is not allowed. I have been wondering for some time how this works.
Does a browser always resolve the IP address and connect to it? Direct IP address access is just skipping DNS altogether, right? How does a remote server even know that you skipped DNS?
यदि आप सीधे आईपी पते का उपयोग कर रहे हैं या नहीं, तो वेब सर्वर कैसे जानते हैं?
उत्तर
SuperUser योगदानकर्ता iAdjunct का उत्तर हमारे लिए है:
To answer your question of how it knows, it has to do with what your browser sends the web server. You are right that the system always resolves it to an IP address, but the browser sends the URL you attempted to access in the HTTP header.
Here is a sample header that I found online, modified to look as though you used Firefox on Windows and typed apple.com into the address bar:
स्पष्टीकरण में जोड़ने के लिए कुछ है? टिप्पणियों में विचार व्यक्त करो। अन्य तकनीक-समझदार स्टैक एक्सचेंज उपयोगकर्ताओं से अधिक उत्तरों पढ़ना चाहते हैं? यहां पूर्ण चर्चा धागा देखें।