So what exactly a URL is?
According to Wikipedia, A Uniform Resource Locator (URL), colloquially termed a web address is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it.
However, the answer can be pretty simple too!In layman terms, a URL signifies a location on the network to which a client can make a request by following certain semantics with an anticipation to get a response.
Here’s how a typical URL looks like :
Consider the URL https://www.google.co.in/search/?q=ABC
However, let us understand this in a different way!
Suppose there’s this guy Tim who wants to set up a new food processing industry which requires a special licence . He wants to ‘make’ a request to FSSAI to get his work done. Here, FSSAI is the host which will serve Tim’s request with a suitable response.
Whenever a client makes request to a URL, the domain name or the IP specifies the host machine. In the above example, www.google.co.in points to the host machine.
Tim gets his appointment fixed with FSSAI’s chairperson. Tim has to make sure that he follows a certain set of protocols while communicating with the chairperson or any other authority.He just can’t communicate with them like he does with his friends. Thus, the scheme defines the protocols or specific set of rules followed by Tim and the host for any communication that happens between them.
HTTP, HTTPS, FTP are a few common schemes followed for web communication.
Tim finally reaches FSSAI’s headquarters. However, he sees that only one of the three blocks allows entry to the visitors. Entry to the other two blocks is allowed only to employees, researchers or any other authorised personnel . Thus the block (in the entire host) to which client communicates is called port.
You’ll be surprised to know that there are 65535 ports available each for TCP and UDP communications! (TCP and UDP are a talk for another day!). The HTTP and HTTPS protocols use port 80 and 443 respectively for all the communication by default. Similarly other protocols are assigned certain default ports too. This is the reason we generally don’t see port numbers in the URLs. (Does not mean that they aren’t there!).
Tim enters the block and looks for the chairperson’s office(Since that is the location which will entertain his request). Thus, chairperson’s office is the reference to the location which will hear Tim’s request. In a URL, this is nothing but the path. /search/ is the path in the above URL.
Sometimes, for a request to be valid and generate a response, the client needs to provide certain data for the server to process. Tim presents his Food Safety report to the Chairperson, enabling him to process it and decide whether to issue Tim the valid licence or not. In the above example search, data after the ?, ie q=ABC is the query submitted to server to process and return a suitable response.
Now see this URL :
I bet this sounds quite understandable now.
So does the URL : https://www.google.co.in:443/search/?query=ABC !
Thank you for reading this article!