Most people are familiar with the concept of a website domain because they use popular services like Facebook or YouTube.
They never fully understand how web addresses work because those websites are easy to navigate by clicking or tapping around.
Instead of clicking on links to navigate the internet, you can also type in a specific URL to go directly to one particular document or file on a website.
When typing in or working with different URLs, understanding the different parts of the URL is useful as not all parts of a URL need to be retyped or are standard across all websites.
What is a Website URL?
Every webpage or file on the internet has a unique address where it can be found at called the Uniform Resource Locator (URL).
URLs can be considered to be like a mailing address or phone number that is used to access a specific document on the internet.
Tip: Although two URLs may look visually similar or may only have minor differences, they are always unique.
The Important Components of a URL
Protocol:
The standard protocol on the internet is known as the Hypertext Transfer Protocol (HTTP), and the secure version of the same protocol is known as HTTPS.
These two protocols are the most common protocols on the internet and are used to serve web page content to users with web browsers.
Another commonly used protocol is the File Transfer Protocol (FTP), which is one way to transfer files between a server and a client, but this can also be done over HTTP or HTTPS.
There are other commonly used web protocols, but no other protocol is as commonly used as HTTPS.
Note: HTTPS is secure in the sense that the private information transmitted between your web browser and the server is encrypted in such a way that anything that can receive a copy of that information will not be able to decipher or read it. It is always preferable to utilize secure connections whenever possible, to help keep people safe while browsing the internet.
HTTP and HTTPS are not Interchangeable, but May Appear to Be
In many cases, websites are configured in such a way where they will automatically direct your web browser to the HTTPS version if you incorrectly specify the HTTP protocol.
When this occurs, the website instructs the web browser to navigate to the HTTPS version of the website through what is known as a redirect, but not all websites are configured to behave this way.
The HTTP version of a website is a different address than the HTTPS version, and those two addresses may have completely different documents on each.
Having these extremely similar addresses is very confusing, so most websites are not configured this way, but it’s important to know that they can be.
Protocol Delimiter:
The colon and double forward slash directly after the protocol name are known as the protocol delimiter, and their purpose is to separate the protocol name from the address.
The reason that this delimiter has two forward slashes is so that the web browser can separate the protocol from the other elements of the URL.
Tip: Most modern web browsers will correctly handle you mistyping and using only a single slash for the protocol delimiter. Browsers will also attempt to guess the correct protocol if you leave the protocol off the URL that you typed in.
Hostname:
The next part of the URL is the hostname, which is the part of the address that exists after the protocol delimiter and is before the next forward slash.
The hostname can be broken up into sections by periods, and there is no limitation on the number of periods in a hostname, other than it must contain at least one.
The hostname optionally consists of the domain prefix and the domain name.
Some web addresses do not have a hostname at all and are just a numeric IP address.
Domain Prefix / Sub-Domain:
The most commonly used domain prefix is “WWW” to indicate that the address is explicitly attempting to connect to the public webserver located at the domain’s host.
Many websites do not even use a prefix at all so that the URLs are easier to type.
Some organizations have many different services that all have separate addresses that utilize their domain name, and this is why some organizations prefer to have the “WWW” domain prefix.
Domain:
The domain name is critically important to brands and companies because they want to have memorable web addresses that are easy to remember.
Without domain names, typing in a web address would require typing in IP addresses and port numbers.
Domain names are not required, but they are vanity names that are much more memorable than the numeric addresses that they represent.
IP addresses can also change under certain circumstances (such as when switching web hosts), making sense to use domain names for web addresses.
Domain Extension:
A domain name is registered with a specific domain extension, the most common being a .com domain.
There are many different domain extensions, some of which help to indicate what part of the world the website is located in, and others that are simply for vanity.
It’s important to understand that the website on a domain does not necessarily have to follow the theme of the domain extension. As an example: There can be e-commerce websites on .org domains.
Common Domain Extensions
.com – Frequently indicates that the domain is a US commercial domain, but the website may also contain information or news.
.org – Indicates that an organization operates the website.
.edu – These domains are only available to educational organizations.
.co.uk – Indicates that the website is a commercial website located in the UK; many other country-specific domain names exist.
Port Number:
For most websites, specifying the port number is not needed as specifying the protocol in the address implies to the browser which port it should use.
The standard port number for a web site is port 80, and the port number can be specified in a URL with a colon and the number of the port.
Port numbers are standardized numbers in an address that specify different services or protocols.
Port numbers range from 0 to 65535 and are frequently used in addresses by system administrators rather than regular internet users.
File Path:
The slashes that appear to the right of the URL’s domain name are known as path separators, and their purpose is to separate the different elements of a path.
It can help think of these file paths as file folders in Windows or macOS, as they are very similar in their function.
Some websites are set up to have their content displayed without a file path in the URL so that it’s easier to type.
There is also a special case of the index page, which does not necessarily require a file path in an address to access.
Tip: Both path separators and protocol delimiters are forward slashes (/) in URLs and not backslashes (\). Using the other slash character is confusing to Windows users as the path separator in Windows is a backslash instead of a forward slash.
File Name:
The file name is the final component of a URL and is always to the right of the very last forward slash.
The file name is typically a description that indicates some information about the file’s contents, but this is not necessarily true.
Many older websites have URLs that use non-descriptive file names, such as numbers.
File Extension:
File extensions are like domain prefixes in the sense that they may or may not exist in a web address, but they are not interchangeable.
The web server and website software are configured to determine whether or not file extensions will be used in web addresses.
When the website is configured to require file extensions to access documents, failing to include it will cause the website to report a File Not Found (404) error.
Conversely, if a web address does not have a file extension, then using the expected file extension (typically .html) may not work correctly. The address is not expected to have the file extension.
Long ago, file extensions were used by software to indicate information about the file format. Still, as computers evolved, it was determined that using file extensions for this purpose was unreliable. Today file extensions are only used as hints about their file formatting.
Since files with known extensions could have different versions or format variations, it became necessary for those files to describe their contents in ways beyond the limitations of file extensions.
Modern web browsers have multiple ways to process and understand the file’s contents without knowing or needing a file extension.
In some configurations, many web servers will tell the web browser which type of file it is attempting to access in the request itself (returned to the browser in what is called the HTTP header), meaning the browser does not read the file at all to know what type of file it is.
Tracking Parameters:
URLs may also contain tracking information, which is typically followed directly after a single question mark.
There are many different tracking schemes, some being very complex, but URL tracking usually only provides some information to the website about where the visitor came from.
If you encounter a URL with tracking information, it is almost always optional and can be left off.
Where To Type a URL Into Your Browser
In most modern web browsers, they have an address bar where URLs can be typed at the top of the browser.
After typing in the web address, you can instruct your browser to navigate to that address by pressing the enter key.
URLs vs. URIs
When talking about web site addresses, the terms URI and URL can typically be used interchangeably, but when talking about other items, they can not be.
A URI (Uniform Resource Identifier) is a unique identifier for a specific item or document.
For example, the unique numbers that books have (ISBNs) are a type of URI because they are unique and identify a specific book.
Since web addresses are the locations on the internet of specific documents, they can be considered a type of URI.
URLs are a type of URI and only differ in the sense that they contain information that web browsers use to access that unique document.