When you open the web browser (i.e., chrome, Mozilla Firefox, or opera mini) in your phone or computer system you type the URL or domain name of a website and then as soon as you press the enter, a new page is loaded before your eyes. Have you ever thought about what that URL is? Why it directs you to a new page in your browser?
Well, here in this article you will get to know about every part of URL.
What is URL?
URL is the acronym for Uniform Resource Locator. It is the address of a resource on the World Wide Web. Every website over internet has a unique address called URL and it is used to indicate the location of web resources to access the web pages. For example, www.webuters.com is the URL of website “webuters” and using this URL you will be able to open the website. Not only website but any resource available over internet will have their URL and without URL you cannot access it.
When you type a query on the search bar of a browser you are moved to the another page which includes multiple website links they are called hyperlinks and when you click anyone of them, a new web page is displayed that’s the home page of the website. You didn’t notice but you do use the URL to open any website over the World Wide Web.
URL (Uniform Resource Locator) contains information, let’s understand in depth:
- The port number on the server that is optional.
- It contains the protocol (http, ftp, etc.) which is used to access the resource.
- The location of webpage on the server.
- A fragment identifier.
- In the directory structure of the server, it contains the location of the webpage.
Let’s take an example to understand it better,
“https://www.webuters.com/career/”, it indicates /career is the subfolder in the server directory with the address of https://www.webuters.com.
http:// or https:// is the protocol which stands for Hypertext Transfer Protocol. It tells the browser about the protocol to use for accessing the web resource. The colon (:) and two forward slashes (//) separates the protocol from the rest of the part of the URL.
The https is the enhanced protocol as compared to http. It is more secure than http and provides encryption mechanism for information sharing between the two parties (server and client). It ensures that the exchange of information between the server and client will be secure and no other third party will be able to access the information. Encryption is the mechanism of encoding the plain text into unreadable format and only that system will be able to access it that have an encryption key. Only client and server know the key to access the encrypted information, thus information will be secure.
The www is the short form of World Wide Web (WWW). Any resource over the web is accessed by World Wide Web. This portion of the URL can be left out many times, as it is not required. For example, if you type “https://webuters.com” , you will still get the webuters website.
Now, let’s understand the domain name – “webuters.com”
Domain name is the host name of the server. Any website over internet has the unique name called domain name. Domain name in https://www.sudokuchamps.app/ is sudokuchamps.app, it points to the IP address of sudokuchamps.app. As every connected computer system over web have a unique name called host name similarly, they have unique IP address too. IP address is the sequence of numbers separated by dots, for example, “google.com” has “22.214.171.124” IP address. Domain name is easy to remember than a long string of numbers. It is simple to enter a domain name in search bar than the sequence of numbers.
Where is the URL located?
A URL is located on the address bar or search bar at the top of the browser window. The URL is always visible in the browser window no matter which type of resource you open, every single resource over internet have a URL.
What characters are not allowed in the URL?
In URL spaces are not allowed. URL string can contain only symbols: “! $ -_ +*'()”, including alphanumeric characters as it is documented in RFC 1738. Any other characters must be encoded in the URL if needed.
Understanding Query string in URL
URL is also used to carry client machine’s information to server machine. Query string is the string which starts after “?” in the URL. It is appended after the end of the URL. A URL example is given below which points to the google search page, including search query parameter.
In search directory of google.com, through query string search information will be shared from client’s machine to server’s machine. The “?” in the URL separates all the variables or parameters to be sent to the script. The parameter being sent is –“q=sign+in&cvid=708f1cdf& PC=U531”, in the above URL example. The “sign+in&cvid=708f1cdf& PC=U531” is the value that is sent to the q variable.
Symbol “&” is used to append more than one value in the URL, as you can see in the above example.
Is URL similar to URI?
There are various differences between URL and URI, which are as follows:
|URL stands for Uniform Resource Locator that is used to describe the identity of the resource.||URI is short form of Uniform Resource Identifier, which offers a technique for defining the identity of a resource.|
|The main aim of the URL is to get the address or location of the resource.||The main aim of URI is to find the resource and distinguish it from other resources with the help of a name or location.|
|URL is the type of URI, so we can say all URLs can be URIs.||URI is the superset of URL, all the URIs are not URL as a URI can be name rather than a locator.|
|It is only used for identifying the web pages.||It is used in different languages such as HTML, XML and other files XSLT, etc.|
|It contains the protocol information.||It does not include protocol information.|
|Example – https://google.com||Example – urn:isbn:0-486-27557-4|
URL is the acronym for Uniform Resource Locator. It is the address of a resource on the World Wide Web. Every website over internet has a unique address called URL and it is used to indicate the location of web resource to access the web pages. It is the combination of protocol, domain name, file location and query string. For example – https://www.google.com/search?q=example%20 .
Any thoughts about what is query string in the URL?