Have you ever wondered when you open a browser in your computer and type in a URL(Uniform Resource Locator), a page magically appears from nowhere and you start reading. If you think that way then you can dig deeper to know more about the mechanism that brought that page to you.
Behind the scenes: If you want to get in to more detail then you have to dig more deeper. The browser split the URL in three parts namely-
• The protocol (e.g., http)
• The server name (e.g., http://www.twikkie.com)
• The file name(e.g., Webservers.htm)
So basically what happens behind the scenes is that when your browser try to connect to a server, it does that by first connecting to a domain name server or DNS. What DNS does is that it maps the server name (www.twikkie.com in this case) to a corresponding IP address.
The communication between a client and a server is done through some “Rules” or say “Protocol”. These protocol or rules defines the methods used for communication. Protocols are often text, and simply describe how the client and server will have their conversation. Protocols like http and https are mostly used for server connection.
So, in short your when your browser sends a request for a file, first the server name is resolved to an actual address(IP address) and after getting this address your browser then formed a connection to the server at that IP address on port 80. Ports are like medium or gateways through which all the communication is done.
Using the defined protocol(http in this case), the browser sends a GET request to the server requesting the file. The browser sends back the HTML text for the file and the browser render the HTML tags to display text on your screen.
Web servers can be anything depending upon the software installed, it can be a e-mail server or FTP server. Clients that come to a server machine for a specific task direct their requests to a specific software server running on the overall server machine.
So, next time you time in a URL, you will have some better understanding of the scenario happening behind the scene.