Protocol Definition : URL
Uniform Resource Locator (URL) is a unique identifier used to locate anything, such as a website, on the internet. The URL will indicate where and how the web browser will retrieve the resource. Mostly, we can find the URL on top of the web page in the browser. To create a complete address, the URL must include the scheme (protocol) and the authority (domain name) the website.
Component of the URL
The component of the URL can be categorized into 3 parts which are scheme, authority, and extension
- Protocol (ie. HTTP, HTTPS, FTP, mailto) = the command that handle the transmission of the webpage
- Host Name (Domain name or IP address) = the name of the website which divided into sub domain and top level domain(ie. .com, .org, .net)
- User infomation = a username and password for the site. (very insecure because the username and password will expose in a plain text in the URL directly) For example www.username:email@example.com
- Port number = specific port to enter the website started with :
- Path = specific location of the page or content on the website divided by /
- Query = query define by user starting with ?. Multiple queriee are separated by &
- Fragments = specific spot on the webpage indicated by #
The mandatory components of the URL would be Protocol and domain name. The other components are optional to specify the extra part of the website that
However, URL is one type of the URI (Uniform Resource Identifier) which is the sequence of character that reference the name and the location or both of the resource. The URL will indicate the location of the resource. On the other hands, URN(Uniform Resource Name), the other type of the URI, will indicate the more specific name of the resource.
Therefore, all the URLs and URNs are URIs but all the URIs are not URLs and URNs.
What is a URL? URL Components and How it Works
What is the URL from howtogeek.com
Networking Basics: What's the Difference Between URI, URL, and URN?
Difference between URL,URI,and URN
What are URLs, URIs, IRIs and URNs?