URLs, protocols, HTTP, and HTTPS
You have typed thousands of web addresses into browsers. Now it is time to learn how to read one properly.
A URLConcept · lights on your mapURLUniform Resource Locator, a structured address that tells a browser where to go and how to communicate. It reads in parts: the scheme (how to communicate), the domain (whom to contact), the path (what to request), and the query string (additional details). is a structured address that tells a browser where to go and how to communicate with the destination. It is not one mysterious string. Each section provides a particular piece of information.
Consider this example, divided into its four main parts:
What is a URL?
URL stands for Uniform Resource Locator.
A URL is an address used to locate something available through a network, most commonly a webpage or other web resource.
A useful way to think about a URL is that it answers several questions:
- How should the browser communicate?
- Who should it contact?
- What should it request?
- Are there any additional details?
Not every URL contains every possible part, but most web URLs follow the same recognizable structure.
The scheme: how should we communicate?
The first part of the example is: https
This part is formally called the scheme, and it tells the browser which method of communication should be used.
In everyday web conversations, people may loosely refer to this section as the protocol because it indicates that the browser should use HTTPS.
The scheme is followed by ://, so the beginning of the URL appears as: https://
You will most commonly encounter two web schemes:
httphttps
HTTPS is now the normal choice for modern websites because it protects the communication between the browser and server.
The domain and subdomain: whom should we contact?
The next part is: www.coffeeapp.com
This is the host, meaning the name identifying the service the browser wants to contact.
The main domain is: coffeeapp.com
As you learned in the previous lesson, DNS helps translate this human-readable name into destination information such as an IP address.
The www section is a subdomain, an additional label placed before the main domain.
Companies can use subdomains to separate different parts of their online systems. For example, www.coffeeapp.com might serve the public website, while support.coffeeapp.com could serve the support center, and api.coffeeapp.com could be used by software communicating with the company’s API.
The use of www is a convention rather than a requirement, and many websites work without it.
The path: what are we requesting?
The next section is: /orders/1042
This is the URL’s path.
The path identifies a particular location or resource within the service, and in this example it appears to refer to order number 1042.
The structure resembles the file paths you studied in Module 2.
However, the path does not necessarily correspond to actual folders and files stored on the server because the application may interpret the path using its own rules.
For example, the server might interpret /orders/1042 as: retrieve the order whose identification number is 1042.
The path helps the server determine which part of the product or which piece of information the client wants.
The query string: what additional details are included?
The final section is: ?receipt=email
This is called the query string.
A query string begins with a question mark and contains one or more query parameters, which provide additional information alongside the main path.
In this example:
receiptis the parameter’s name.emailis its value.
The application might interpret this as a request to deliver the receipt through email.
Several query parameters can appear in the same URL, usually separated using an ampersand: ?receipt=email&language=en
This contains two labeled values:
receiptequalsemaillanguageequalsen
The structure should look familiar from the previous module. It resembles labeled data, with each name associated with a value.
The exact meaning is determined by the server. A query parameter is information included in the request; it does not force the server to perform a particular action.
What is a protocol?
A protocolConcept · lights on your mapprotocolA shared set of rules governing how systems communicate: how messages begin and end, how information is organized, how failures are communicated, what responses are allowed. Protocols are what make communication between independently built systems possible. is a shared set of rules governing how systems communicate.
Imagine two people sending formal letters. For the exchange to work smoothly, both people need shared expectations about where the address belongs, how the message is organized, and how a response should be written.
Computers also need shared expectations. A client and server may have been built by different teams, using different technologies, in different countries, yet they can still communicate because both follow the same protocols.
Protocols define matters such as:
- How a message begins and ends
- How information is organized
- How the recipient should interpret the message
- How failures are communicated
- What responses are allowed
Protocols are what make communication between independently built systems possible.
What is HTTP?
HTTPConcept · lights on your mapHTTPHypertext Transfer Protocol, the main protocol for communication between web clients and servers: how a client sends a request and how a server returns a response. HTTPS is the same protocol with encryption added. stands for Hypertext Transfer Protocol.
HTTP is the main protocol used for communication between web clients and servers, and it defines how a client can send a request and how a server can return a response.
For example, a browser might use HTTP to ask: please send me the webpage for this URL.
The server may respond with the page’s content, an error, or instructions directing the browser somewhere else.
HTTP is not limited to traditional webpages. Web apps, mobile applications, APIs, and software services commonly use HTTP to exchange information.
The next lesson will examine the structure of an HTTP request and response more closely.
What is HTTPS?
HTTPSConcept · lights on your mapHTTPSHTTP communication protected by encryption. The padlock means the connection is encrypted and the certificate checked out, not that the site is honest. is HTTP communication protected using encryption.
The final S stands for secure.
Without this protection, information traveling between the client and server could potentially be read or changed by other parties along the route.
HTTPS creates an encrypted connection so that information such as passwords, messages, payment details, and page contents cannot normally be read by the networks carrying it.
The systems between you and the server may still be able to observe some connection information, such as the destination’s IP address and, in many cases, its domain. However, they generally cannot read the specific path, query parameters, request contents, or response contents inside the encrypted connection. The letter stays sealed.
What does the padlock mean?
Browsers commonly display a padlock or another security indicator when a website uses HTTPS.
This tells you that:
- The connection between your browser and the website is encrypted.
- The website presented a valid digital certificate for the domain.
- Information sent through the connection is protected from ordinary interception or modification.
The indicator does not prove that the website is honest, safe to purchase from, or operated by a reputable company.
A scam website can obtain a valid certificate and use HTTPS, so the connection to the scammer may be securely encrypted. The scammer is still a scammer.
A useful distinction is: HTTPS protects the journey. It does not guarantee the intentions of the destination.
You will learn about certificates, encryption, and digital keys in the security module.
Reading the complete URL
Return to the original example: https://www.coffeeapp.com/orders/1042?receipt=email
You can now read it as: use HTTPS to contact www.coffeeapp.com, request the resource identified by /orders/1042, and include the additional parameter receipt=email.
Each section performs a different role:
httpsdescribes how to communicate.www.coffeeapp.comidentifies whom to contact./orders/1042identifies what to request.?receipt=emailsupplies an additional detail.
The mental model to remember
A URL is a structured address used to locate a resource.
The scheme indicates how communication should happen.
The domain identifies the online service, while a subdomain can identify a particular section of that service.
The path identifies a location or resource within the service.
The query string contains additional labeled information.
A protocol is a shared set of rules for communication.
HTTP defines how web clients and servers exchange requests and responses.
HTTPS protects that HTTP communication through encryption.
You should now be able to look at a typical URL and identify how the browser should communicate, which service it should contact, and what information it is requesting.
You're reading the URL https://api.coffeeapp.com/customers/88/orders. Before anything loads, what can you already say about it?
▼ answer the check to continue ▼