Uniform Resource Locators, commonly known as URLs, are the web addresses we use every day to navigate the vast world of the internet. While we click, type, and share URLs regularly, few of us pause to think about the intricate parts that make up these essential elements of the web. Let’s delve into the anatomy of a URL to understand its components and how they function.
The Basics: What is a URL?
A URL is a string of characters that provides the address for a resource on the internet. It typically consists of several parts, each serving a specific purpose in identifying and locating the resource.
The Parts of a URL
1. Scheme
The scheme, also known as the protocol, indicates the communication protocol used to access the resource. Common schemes include HTTP, HTTPS, FTP, and others. For example, in “https://www.example.com“, “https” is the scheme.
2. Subdomain
A subdomain is a prefix that precedes the domain name and identifies a specific subset of the domain’s content or a separate area of the website. In “https://blog.example.com“, “blog” is the subdomain.
3. Second-level Domain
The second-level domain is the primary part of the domain name that identifies the organization or entity responsible for the website. In “https://www.example.com“, “example” is the second-level domain.
4. Top-level Domain
The top-level domain is the last part of the domain name and indicates the type or purpose of the website. Common TLDs include .com, .org, .net, and country-specific TLDs like .uk or .de. In “https://www.example.com“, “.com” is the TLD.
5. Subdirectory
A subdirectory is a folder or directory on the web server that contains specific files or resources. It follows the domain and is separated by slashes (“/”). In “https://www.example.com/design“, “/design” is the subdirectory.
6. Port
The port number, if specified, indicates the specific communication endpoint on the server for the resource. It follows the domain or IP address and is separated by a colon (“:”). For example, in “https://www.example.com:8080“, “8080” is the port number.
7. Path
The path specifies the location of a specific resource on the server. It follows the domain and is separated by slashes (“/”). For instance, in “https://www.example.com/design/parts-url“, “/parts-url” is the path indicating a specific article resource.
8. Query
The query, if present, provides additional parameters for the resource, such as search terms or data filters. It follows the path and is typically preceded by a question mark (‘?’). For example, in “https://www.example.com/design/parts-url?postid=420“, “postid=420” is the query string specifying the search for the document id with 420. This query string specifies the parameters of the data being requested from the website’s database.
9. Parameters
Parameters are specific values passed within the query string to customise the request. They follow the query string and are separated by ampersands (“&”). For example, in “https://www.example.com/design/parts-url?postid=420&hl=en“, “postid=420&hl=en” is a parameter specifying the search type.
10. Fragments
Fragments, sometimes called fragment identifiers or anchors, identify a specific section within the resource. They follow a hash symbol (“#”) and are often used in web pages to link to a specific section. In “https://www.example.com/design/parts-url?postid=420&hl=en#section5“, “#section5″ points to a section within the post.
Understanding Search Generative Experience (SGE)
Now that we’ve dissected a URL, let’s reconstruct it with all its parts:
In this URL:
- Scheme: HTTPS
- Subdomain: blog
- Second-level Domain: example
- Top-level Domain: .com
- Subdirectory: /design/
- Port: :8080
- Path: /parts-url
- Query: ?
- Parameter: postid=420&hl=en
- Fragment: #section5
Image: freepik.com