Hostwinds Blog

Search results for:


11 Parts of a URL: A Complete Guide Featured Image

11 Parts of a URL: A Complete Guide

by: Hostwinds Team  /  January 19, 2024


The URL, or Uniform Resource Locator, is a web address that browsers use to locate a specific resource on the internet. It is one of the myriad foundational elements that bring order to what could be a chaotic internet. But have you ever stopped to think about what makes the URL so significant?

It all stems from its structure and today we'll be walking you through the URL structure, defining its various parts, understanding how they work, and learning their significance within the online ecosystem.

Basic URL Structure

Every URL across the internet is made up of a protocol, domain name and a directory, giving users and search engines information on what a website is about, their location on the site and how secure the site is.

While these three components are foundational to a URL's anatomy, many websites contain additional attributes that further contribute to user experience and search engine optimization.

Let's take a more detailed look at the foundational and additional components of a URL.

basic-url-structure.png

Protocol

url-protocol-thumbnail.png

The Protocol, also known as scheme, is a set of rules that define how website resources and information are transferred between the web server and browser.

The most common URL protocol is HTTPS, which stands for Hypertext Transfer Protocol Secure. This lets us know that the website has been authenticated and contains an SSL/TLS certificate, which encrypts any information shared between the browser (user) and the website, such as passwords and credit card information.

A small number of sites do use HTTP, the non-secure protocol, which is not typically recommended. This doesn't necessarily indicate a nefarious website but the lack of encryption exposes the site and its users to potential cyber threats.

Other common URL protocols include FTP (File Transfer Protocol) for transferring files between a client and server, and SMTP (Simple Mail Transfer Protocol) used by mail servers to send emails.

Subdomain

url-subdomain-thumbnail.png

The subdomain in a URL is used to distinguish specific resources from other types of content housed under the same root domain. For instance, "blog.example.com" and "shop.example.com" indicate that the "example.com" domain has a site dedicated to blog content and another to shopping.

Though they share a root domain, search engines treat subdomains as separate entities, independent from the root domain's website. While not necessarily a bad thing, it is important to understand how subdomains work and their potential impact on SEO.

Root Domain

url-rootdomain-thumbnail.png

The root domain, also known as the second-level domain, is the main identity of a website. When paired with the top-level domain, it is 100% unique to a specific site and cannot be duplicated. For instance, there can be only one hostwinds.com, hostwinds.net, and hostwinds.ca.

To help preserve brand identity, many companies will purchase their root domain under several different top-level domains and redirect them to a single domain - hostwinds.net and hostwinds.ca both redirect to hostwinds.com.

Top-Level Domain (TLD)

url-top-level-domain-thumbnail.png

Also known as the domain extension, the top-level domain indicates the purpose or type of entity behind the website and is the first stop of the DNS process.

For example, the ubiquitous ".com" lets us know the website is for commercial purposes, while ".edu" indicates an academic institution.

Some TLDs have registration restrictions, meaning that in order for the entity to own it, they must meet specific criteria set by the registry - ".edu" websites can only be owned by accredited academic institutions, typically colleges and universities. Similarly, ".gov" is solely reserved for US government entities.

Subdirectory

url-subdirectory-thumbnail.png

A subdirectory, also called a subfolder, is used to organize and categorize content on a website, letting users and web crawlers know what section of the website they're on. It also indicates the type of content one can expect to see within that section.

For example, "hostwinds.com/blog"  tells us that we are in the blog subdirectory of the Hostwinds website, and we should expect this section to contain blog posts.

Slug

url-slug-thumbnail.png

The URL slug usually follows the subdirectory, separated by a slash ("/"). It is typically in an easy-to-read format, helping users and search engines better understand the page's content.

For example, "hostwinds.com/blog/url-structure" lets us know the blog post on this page is about URL structure.

Path

url-path-thumbnail.png

The URL path represents the portion of the web address after the top-level domain. It it includes the subdirectory and slug(s), giving the specific location of a page within the website's hierarchy.

For instance, in "example.com/products/electronics/phones," the path is "/products/electronics/phones," which tells us the "phones" page can be found in the "electronics" category of the "products" section of the website.

URL parameters and fragments are not part of a URL path. We'll explain those parts of the URL next.

Advanced URL Structure

With the basic anatomy of a URL laid out, we can now look into some of its more complex components.

advance-url-structure-png.png

Port

url-port-thumbnail.png

The port of a URL is a numeric value that tells browsers the type of connection they need to establish in order to access a specific application or system (i.e. a website) on a web server.

The type of connection to the application or system is determined by the protocol defined by the server. The server identifies the protocol by its associated port number - HTTP is 80, HTTPS is 443, FTP is 21, and so on.

Ports are not typically displayed in URLs because web browsers are designed to recognize common protocols (ex. HTTP and HTTPS) and will automatically connect using the associated port.

Query

url-query-thumbnail.png

The question mark (?), found after the subdirectory, is known as the query. This punctuation mark tells us that the browser is asking the web server to find a specific piece of information or content on its website. The query string follows the query (see below).

Query String

url-query-string-thumbnail.png

Also called URL parameters or simply parameters, the query string is a series of key-value pairs, each separated by an ampersand (&). These key-value pairs contain the specific website information or content the browser is asking the web server to find.

Parameters are also commonly used by websites to track marketing campaigns and user behavior.

Fragment

url-fragment-thumbnail.png

The fragment's main purpose is to direct users to a specific location on the webpage. It is the hash (#) followed by a word called the fragment identifier, and can be found anywhere after the TLD.

Fragments are commonly used in long-form web content, allowing users to jump to a specific section, as opposed to scrolling, but are also known to direct someone to more generic portions of a webpage like the footer.

URL Structure: Internet's Unsung Hero

The URL and its parts play a quiet, yet significant role across the internet. It is one of the many foundational elements that allow users to surf the web with ease and website owners to create organized secure online environments. Every component shapes the user experience and optimizes sites for search engines. It is the unsung hero of the internet.

Written by Hostwinds Team  /  January 19, 2024