- BlockByte
- Posts
- URL structure explained! A Short Guide
URL structure explained! A Short Guide
Understanding the Components and Hierarchy of a URL
Today’s Insights: 👈️
What is a URL?
How is a URL structured?
Summary
What is a URL?
A URL (Uniform Resource Locator) is a reference or address used to access resources on the internet. It acts as a web address that guides users and systems to a specific location or resource, such as a web page, a file, or an API endpoint. URLs are fundamental to web navigation, serving as the cornerstone for accessing and interacting with content on the World Wide Web.
The term URL was coined in the early days of the web by Tim Berners-Lee, the inventor of the World Wide Web. URLs were designed as a simple and consistent way to access various resources on the internet, ensuring that users and applications could locate and retrieve information easily.
How is a URL structured?
A URL is structured with a schema (protocol), subdomain, second-level domain, top-level domain, optional port number, path, query parameters, and a fragment identifier. These components work together to specify the exact location and method of accessing a resource on the internet.
URL - Schema: The image highlights "https" in the URL. The schema (or protocol) indicates the method used to access the resource. In this case, "https" stands for HyperText Transfer Protocol Secure, which is the secure version of HTTP.
URL - schema
URL - Subdomain: The image highlights "blog" in the URL. The subdomain "blog" specifies a subdivision of the main domain, allowing organization of content into different sections or services within the website.
URL - subdomain
URL - Second-Level Domain: The image highlights "blockbyte" in the URL. The second-level domain (SLD) "blockbyte" is the unique name registered by the domain owner and identifies the main entity or brand of the website.
URL - second-level domain
URL - Top-Level Domain: The image highlights "tech" in the URL. The top-level domain (TLD) "tech" is the highest level of the domain name hierarchy and follows directly after the second-level domain. It indicates the general type or geographical origin of the website. Top-level domains can be generic (like .com, .net) or country-specific (like .de, .fr).
URL - top-level domain
URL - Port: The image highlights "443" in the URL. The port number "443" specifies the communication endpoint for the server. Port 443 is the default port for HTTPS, indicating secure communication. The port number is not displayed in the browser's address bar when it is the default port for the protocol being used.
URL - port
URL - Subdirectory: The image highlights "articel" in the URL. The subdirectory "articel" represents a directory or folder on the server that contains the specific resource or content being accessed.
URL - subdirectory
URL - Path: The image highlights "specific-topic" in the URL. The path "specific-topic" specifies the exact resource within the subdirectory "articel" that the user is trying to access.
URL - path
URL - Query: The image highlights "?page=2" in the URL. The query parameter "?page=2" passes additional information to the server, such as specifying that the user wants to view the second page of results.
URL - query
URL - Parameters: The image highlights "#final" in the URL. The fragment or anchor "#final" directs the browser to a specific section within the web page, such as the final part of the content.
URL - parameters
Summary
A URL (Uniform Resource Locator) is a web address used to access resources on the internet, fundamental for web navigation. Coined by Tim Berners-Lee, URLs provide a consistent way to locate and retrieve information. A URL is structured with several components: schema (protocol) like "https" indicates the method used to access the resource securely. The subdomain (e.g., "blog") organizes content into sections, while the second-level domain (e.g., "blockbyte") identifies the main entity of the website. The port number (e.g., 443 for HTTPS) specifies the server endpoint but is often omitted in default cases. The subdirectory (e.g., "articel") and path (e.g., "specific-topic") indicate the resource location. Query parameters (e.g., "?page=2") pass additional information, and fragment identifiers (e.g., "#final") direct to specific sections within a web page. These components work together to precisely locate and access resources on the internet.