What Is URL?
URL Stands for Uniform Resource Locator. It is a web address that is used to locate any of the data stored on the cloud using the internet. URL is a type of Uniform Resource Identifier (URI).
Use Cases of URL
URL can be used for many utilities such as to locate the web addresses using the protocol HTTP or HTTPS, it can also be used for FTP, mailto, JDBC, and more other applications –
- HTTP: Hyper Text transfer protocol
- HTTPS: Hyper text transfer protocol over Secure Socket Layer (SSL).
- FTP: File transfer protocol, mostly it is used to transfer files to the cloud storage
- Mailto is a function used to send mail to anyone.
- JDBC is a database mostly used when you re using java as your core language.
Structure of URL
The URL consists of the following items –
- Protocol
- Hostname
- Domain name
- A web page or file name
A simple example of URL is –
http://example.com/filename.html
Here,
- HTTP is the protocol
- example is a hostname
- com is the domain name
- The filename is the address for the specific file or the web page.
Using this URL, we can pen any kind of files or any web page on the world wide web. The hostname might change depending on the service we want to access. In the same way, the domain name can be different. There are many domain names available, among which the most popular ones are –
- Com
- Net
- Info
- Org
However, there are country level domains available such as co.uk, .in, .us, etc. Furthermore, the protocol can also be different as we have already discussed. There might be a different protocol used depending on what we want to access.
Moreover, there might also be the port number required depending on the website we are opening. So, there might be a possibility where we will also have to state the port number.
IP Address Vs Domain name
Whenever we save a file on the internet, in any of the cloud services, we will either get the IP Address of the cloud or you will get the whole path or the domain name.
In other words, we can access the file using the domain name as we have seen on the structure section or alternatively, can also access it using the domain name. Both of these things are called a URL.
In some of the cases, we will also have to state the port number in order to access the web page or the file.
Most of the time, the IP address is not given unless we have to access the file manager of the website. So, we only come across the domain name and not the IP address. We have to write the name and you will get the file.
Subdomain
There might be a scenario where the domain name is not direct and the subdomain is used instead. The subdomain looks pretty much the same. The only difference is that, before the hostname, you will also have to write the subdomain.
The structure for subdomain goes
Here, the sub is the name of the subdomain. In this way, you can access the subdomain of any particular website.
Please note that the path or the URL might be longer than the one stated over here. So, if we come across the long URL, they are valid. If entering any of the data on the web page or the file, make sure the protocol is HTTPS. It is considered to be the most secured protocol and we won’t lose any of the data.