Uniform Resource Locator a.k.a. URL is a resource naming or locating format used to specify or address the resource. URL is very popular with the web where web sites and web resources are addressed or identified with URL format.
URL has a very strict syntax which is defined in RFC 1738. It has the following syntax where some information about the resource is provided.
schemeis the protocol used to retrieve the URL resource which is generally HTTP, HTTPS, FTP
locationis the address of the resource which generally starts with the `www` to specify the web resources.
portis the port number of the resource which is generally omitted because schemes have default port numbers that will be used implicitly. HTTP is 80, HTTPS is 443 etc.
querystringis a parameter provided to the resource which is used to put some data about the request.
As an example, this syntax is implemented in the following example.
httpsis the scheme or protocol we will use to communicate with the location or server
www.poftut.comis the location or server we will communicate
what-is-chmod-777is the resource we want to get and use
We can see this example do not provide a port or query string as the port is default value provided by HTTPS – 443 and there is no query string as we do not need for this case
The scheme is the protocol we will use during communication with the remote server or location. There are different schemes invented on the internet. Below we will example the most popular of them below.
- HTTPS is another popular protocol and expected to be the most popular protocol in the next years. HTTPS is just an HTTP protocol secured with the SSL.
- FTP or File Transfer Protocol is a very old protocol that is used to transfer files or bulk data between server and client.
- TELNET is an interactive remote management protocol that provides a shell for the remote system. TELNET is generally used in management systems and network devices.
Location is the address of the remote system. Location can be also named as a server as a remote system will serve its resources to the client. Location can be expressed in different ways like below.
The domain name is used to address a specific location or system. Domain names are used via Domain Name System or DNS. Computer networks work with IP Addresses. But as human beings, we need a more simple solution to name and use systems. We can name systems with domain names in a human-readable format. We can use the following names as domain or location name in URL
www.poftut.com poftut.com test.poftut.com
Ip Address is a four-octet value which is delimited with the points like
192.168.1.2. IP addresses are used to address systems in a computer network. So we can use an IP address as a location like below. In this example, we will set the location as
192.168.1.1 with the HTTPS scheme.
IPv6 is a newer version of IP Address. We can use IPv6 address the same as IP address.
Port is used to specify the location TCP or UDP port number. But TCP is the most popular port number with the HTTP, HTTPS protocols. Port numbers are generally used implicitly with the scheme or protocol like HTTP, HTTPS, FTP. So we do not provide port number explicitly. So the following examples are the same request or URL.
But we can specify the port number explicitly. In this example, we will specify the port number as 81 .
Here are some protocols/schemes and defacto port numbers.
- HTTP – 80,8080
- HTTPS – 443
- TELNET – 23
- FTP – 21
- LDAP – 389
URL Query String
When we request a resource can provide some Query String. Query String can be used to provide special parameters to a resource request. For example, if we want to use
/ on poftut.com with the word
linux we can use we can string like below. The query string key will be
s and value will be
linux like below.
Providing User Name and Password In The URL
Up to now, we have used the location as a DNS name or IP address. But if we need to specifically use a user name and passwords we can use the following syntax.
- username is used to specify the user like ismail, john, admin.
- password is used to put the password of the user where we need authentication to use a specified URL or resource.
Username and password generally required in the HTTP, HTTPS, and FTP protocols to use the remote resource. In this example, we will authentication with the admin user and password
HTTP URL Examples
In this part, we will provide different HTTP URL examples.
http://www.poftut.com http://220.127.116.11/ http://www.poftut.com/?s=grep http://18.104.22.168/?s=grep http://www.poftut.com:80 http://www.poftut.com:80/what-is-chmod-777/
HTTPS URL Examples
In this part, we will provide different HTTPS URL examples.
https://www.poftut.com https://22.214.171.124/ https://www.poftut.com/?s=grep https://126.96.36.199/?s=grep https://www.poftut.com:80 https://www.poftut.com:80/what-is-chmod-777/
Mail URL Examples
In this part, we will provide different Mail URL examples.
FTP URL Examples
In this part, we will provide different FTP URL examples.