How can you access any online resource with just a few clicks or taps? The answer is URL, which stands for Uniform Resource Locator. A URL is a web address that lets us access web pages, files, images, and videos. URLs are essential for the web’s functioning and navigation, as they enable communication and data exchange between users and machines.
In this article, we will explore what URLs are, how they work, and how to use them effectively. We will also learn about the history and evolution of URLs, the different types and formats of URLs (such as URL shortener or tiny URL), and the best practices for creating and using URLs. This article will help you understand and appreciate URLs and their role in the web.
This article will teach you more about URLs and their role in the web if you are interested in learning more.
History of URLs
Do you know how URLs came to be and how they changed over time? In this section, we will explore the history of URLs, from their invention by Tim Berners-Lee in 1989 to their present and future. The section will cover the origin and evolution of the URL syntax, the different types and formats of URLs, and how URLs have shaped the World Wide Web.
According to Berners-Lee (1999), the inventor of the World Wide Web, URLs were designed as a way of identifying and locating web resources. He was working at CERN and wanted to share information between different computers. He created a universal naming system, which he called URLs. The first URL was http://info.cern.ch/, which was the address of the first web page ever created.
The URL scheme was based on the concept of Uniform Resource Identifier (URI), which was a generic syntax for identifying any kind of resource on the internet. A URI had two parts: a scheme name (such as http, ftp, mailto, etc.) and a scheme-specific part (such as the domain name, path, query, etc.). A URL was a type of URI that specified the location of a resource, while a URN specified the name or identity of a resource.
As the web grew and diversified, URLs also evolved and expanded to accommodate new types of web resources and protocols. For example, in 1994, the IETF standardized the URL syntax and defined several common schemes in RFC 1738. In 1996, the IETF introduced relative URLs, which allowed web pages to reference other resources using shorter and simpler URLs. In 2005, the IETF and the W3C published RFC 3986 and RFC 3987, which updated the URI syntax and introduced IRIs, which allowed URLs to use non-ASCII characters.
Difference between URI and URL
The difference between URI and URL can be confusing, but here is a simple explanation:
- URI stands for Uniform Resource Identifier. It is a string of characters that identifies a resource on the internet, such as a web page, a file, an image, etc. A URI can be either absolute or relative. A URI can also be either a name or an address of a resource.
- URL stands for Uniform Resource Locator. It is a subset of URI that specifies both the name and the address of a resource on the internet. A URL also includes the scheme (such as http, https, ftp, etc.) that defines how to access the resource. A URL is always absolute.
In other words, all URLs are URIs, but not all URIs are URLs. A URL tells you where and how to find a resource, while a URI just tells you what the resource is.
For example, https://www.example.com/index.html is both a URI and a URL. It identifies a web page (the resource) and tells you where to find it (https://www.example.com) and how to access it (using https).
However, /index.html is only a URI, not a URL. It identifies a web page (the resource), but it does not tell you where or how to find it. It is a relative URI that depends on the context of the base URL.
Parts of a URL
The parts of a URL or structure of a URL are the different components that make up a web address. A URL consists of five parts: the Protocol or scheme, subdomain, top-level domain, second-level domain, and subdirectory. Here is an example of a URL and its parts:
Protocol or Scheme
This is the first part of the URL that indicates how the browser should communicate with the web server. In this case, the protocol is HTTPS, which stands for Hypertext Transfer Protocol Secure. This means that the data exchanged between the browser and the server is encrypted and secure.
This is the optional part of the URL that precedes the second-level domain and separates different sections or services of a website. In this case, it is blog, which indicates that this URL belongs to the blog section of HubSpot’s website.
Top-Level Domain (TLD)
This is the last part of the domain name that indicates the type or category of the website. In this case, the top-level domain is .com, which stands for commercial. This means that the website is intended for commercial purposes or businesses. Other examples of top-level domains are .org for organizations, .edu for education, .gov for government, etc.
Second-Level Domain (SLD)
This is the name of the website and main part of the domain name that identifies the website or the owner of the website. In this case, the second-level domain is hubspot, which identifies the brand or organization behind the website. The second-level domain can be anything that is not already taken by another website and that follows the rules of domain name registration.
This is the part of the URL that follows the domain name and indicates a specific page or section within the website. The subdirectory is an optional part that specifies a further location or category of the web resource In this case, it is marketing/parts-url, which indicates that this URL belongs to the marketing category and has a subcategory of parts-url. The subdirectory can have multiple levels or segments separated by slashes (/), such as /category/subcategory/article-title/.
These are the main parts of a URL that you need to know. There are some other parts, such as parameters and anchors, which are optional parts of a URL that can provide additional information or functionality to a web resource. Here is an example of a URL with parameters and an anchor:
- Parameters are key-value pairs that are separated by an equal sign (=) and start with a question mark (?) after the path. They can be used to filter, sort, or customize the web resource. For instance, in the example above, the parameter q=URL tells the web server to search for the term “URL” on the website.
- Anchors are identifiers that start with a hash sign (#) and refer to a specific part of the web resource. They can be used to jump to that part without loading the whole page. For instance, in the example above, the anchor #search-results-close-container tells the web browser to scroll to the element with that id on the page.
Types of URLs
HTTP stands for Hypertext Transfer Protocol. It is a protocol that defines how web browsers and web servers communicate and exchange data over the internet. HTTP uses a request-response model, where the browser sends a request for a resource (such as a web page) and the server responds with the resource or an error message.
HTTPS stands for Hypertext Transfer Protocol Secure. It is a secure version of HTTP that uses encryption to protect the data transmitted between the browser and the server. HTTPS prevents eavesdropping, tampering, and spoofing of the data by third parties. HTTPS uses certificates to verify the identity of the server and establish a secure connection.
FTP stands for File Transfer Protocol. It is a protocol that allows users to transfer files between computers over a network. FTP uses two connections: one for control information (such as commands and responses) and one for data (such as files and directories). FTP can be used to upload or download files, create or delete directories, rename or move files, etc.
Mailto link is a type of URI scheme that specifies an email address. You can use it to create hyperlinks that open an email application and pre-fill the recipient’s address. You can also add other parameters to a mailto link, such as subject, body, cc, bcc, etc. For example, mailto:email@example.com?subject=Hello&body=This is a test email.
Tel is another URI scheme that specifies a telephone number. With a tel link, you can create hyperlinks that open a phone application and dial the number. A tel link can also use other parameters, such as extension, pause, wait, etc. For example, tel:+1-555-1234;ext=5678.
Absolute URLs are URLs that specify the full address of a web resource, including the scheme, the server, and the path. You can use absolute URLs to link to any web resource on the internet, regardless of the current context. For example, https://www.example.com/index.html is an absolute URL.
Relative URLs are URLs that show a web resource’s address based on the current context. They omit the scheme or server and show the path or part of it. They depend on the current context and link to resources within the same site. For example, /index.html is a relative URL that points to the same resource as https://www.example.com/index.html, if the base URL is https://www.example.com.
Root-relative URLs are relative URLs that start with a slash (/) and show a web resource’s address based on the site’s root. They omit the scheme or server and show the full path from the root. They depend on the current context and link to resources within the same site. For example, /images/logo.png is a root-relative URL that points to an image file in the images folder under the site’s root.
This article has explained what is a URL address and what does URL stand for. A URL is a web address with different parts and types. We have explored the history, function, and format of URLs. We have also covered examples on URLs, types of URLs, URL parameters, parts of a URL, and URL full form. To learn more about URLs, such as types of URLs (in detail) or best practices for creating and using URLs, visit our website.