URLs are composed of ten key components, each serving a unique purpose in directing users to specific web resources. While not every URL contains all of these components simultaneously, a URL will typically include at least three of them. Let’s delve into a comprehensive understanding of URL structure:
Scheme (Protocol)
The scheme, also known as the protocol, specifies which protocol to utilize when accessing a web page. The mostly scheme today is HTTPS (Hypertext Transfer Protocol Secure), ensuring secure data transmission by encrypting user information like passwords or another details.
Subdomain
Similar to rooms in a house, subdomains specify particular sections of a website. For example, “blog.example.com” directs users to the blog page of the website.
Second-level Domain (SLD)
The second-level domain is the name of the website, providing users with brand recognition. For instance, “mlb.com” indicates Major League Baseball’s website.
Top-level Domain (TLD)
The TLD indicates the type of entity the website represents. For example, “.com” is commonly associated with commercial entities, while “.edu” is reserved for educational institutions.
Subdirectory (Subfolder)
Subdirectories help users and web crawlers navigate specific sections of a webpage. For example, in “https://shop.example.com/hats”, “hats” represents a sub-folder of the “Shop” page.
Port
The port number specifies the connection endpoint for directing data to a specific service on a server. Common port numbers include 80 for HTTP and 443 for HTTPS.
Query
Query parameters, preceded by a query mark (“?”), specify parameters for data recovery from a website’s database. They have key-value pairs separated by an equal sign (“=”). Multiple parameters are separated by ampersands (“&”).
9. Parameters
Parameters are the values queried during a search, such as search terms or encrypted values. They are integral to tracking marketing efforts through UTM parameters appended to URLs.
10. Fragments
Fragments, denoted by a hash symbol (“#”), specify a specific location on a webpage, such as an ID or name attribute. They enhance user experience by directing users to relevant sections within a webpage.
Understanding URL structure is crucial for optimizing user experience and search engine visibility. Each component plays a subtle yet essential role in directing users to the desired web resources.