Describe the various components of URL


A URL (Uniform Resource Locator) is a special identifier used to find a resource on the Internet. It is also known as a web address. For example, an order for the post office to know where to send a box when someone sends a package for occasions, they must provide an address. The URL is the address a web browser needs to enter in order to find the particular page being looked for.

A URL is made up of several components, including a scheme, subdomain, top-level domain, second-level domain, subdirectory, parameter, port, path, query, and fragment. While a URL need not have all of these components at once, it must always have three of them in order to instruct a web browser how and from where to get a resource.

Considering the following URL ‘https://www.tutorialspoint.com/index.htm’ and discussing the various components of URL.

Scheme

The protocol, often referred to as a scheme, instructs web servers which protocol to use when they access a page on your website. The most popular protocol in use today is HTTPS. It offers a secure version that employs encryption to provide an additional layer of security. When transmitting sensitive data over the internet, including passwords or credit card numbers, HTTPS is utilized.

By applying this security policy, you may secure the users of your website and improve your website's Google ranking. There are other schemes you may observer, such as mailto://, which will launch your computer's default email so you may start composing an email to the address you specified in the URL.

Following is the protocol type in the URL −

https:

Subdomain

A subdomain is a name that has extra information at the beginning of your domain. It's used to arrange content on websites that performs a particular function. such a blog, online store, or careers page. Although www is the most popular subdomain, there are numerous others that can be used.

Following “www” is the subdomain

https://www.

Second – Level Domain

A second level domain is the name that appears to the left of the domain extension, such as.com or.net. For instance, in a domain name like "tutorialspoint.com," the word "tutorialspoint" as the second-level domain, is where domain holders place the brand name, project name, organization name, or other known identifier for users.

https://www.tutorialspoint

Top – Level Domain

A top-level domain is the final text of a domain name, such as.com or.net. Top-level domains are also referred to as domain suffixes, URL extensions, and domain extensions. They are a crucial component of the marketing plan of every internet company.

Top-level domains help in the identification, grouping, and classification of websites according to their content, function, or location. For instance, websites with the “.com” TLD are used for commercial purposes. While educational institutions and schools utilize the “.edu” TLD. It gives users and search engines a sense of the products and services your website offers, as well as your location and line of business.

https://www.tutorialspoint.com

Subdirectory

A subdirectory, often referred to as a subfolder, makes it easier for users and web crawlers to identify the specific area of a webpage they are currently on.

For example, let’s consider the URL we chose before: ‘https://www.tutorialspoint.com/index.htm’. Which is a learning platform offering a lot of courses to learn. We can observe that the subdomain is "www" and the subdirectory is index," which indicates that the URL serves up the index page, which is the subfolder of the "www" page.

https://www.tutorialspoint.com/index

Path

The path indicates the exact location of a page, post, file, or other asset. It frequently serves as an analog to the website's underlying file structure. The path is located after the hostname and is separated by the forward slash "/". The path also contains any asset file extensions, including those for images (.jpg or.png,), documents (.pdf or.docx), and more.

https://www.tutorialspoint.com/index.htm

Here, ‘.htm’ is the path for the above mentioned URL.

Updated on: 19-Jan-2024

13 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements