Dina types https://myshop.com/shoes into the address bar (the address box at the top of the browser). It looks like a single line. But it holds three parts, and each part is read by someone different.
The three parts of an address
A full address like https://myshop.com/shoes is called a URL.
https://is how to send it (the protocol): the rules for how the browser and the server talk. Thesafterhttpmeans the request and its reply are sealed, so nobody else can read them. The seal is explained at the end of this chapter.myshop.comis the name of the place (the domain). The browser asks DNS for the IP address of that name, then sends the request to that IP address./shoesis the way inside that place (the path). The routers on the road don't read this part. MyShop's server reads it, to know which page is wanted.
If you change /shoes to /bags, you still go to the same shop, but you ask for another page.
💡 A door number nobody writes
Sometimes a number follows the domain name, such as myshop.com:443. That number is the door number (the port) on the server. The browser already knows that https uses door 443 and http door 80, so the door number usually isn't written.
TL;DR: A URL (the full address of a page) has three main parts: how to send it (https://), the name of the place (myshop.com) and the way inside that place (/shoes), which is the page that is wanted. DNS needs only the name of the place. The server reads the way inside that place.
⚡ One address, three parts
Write:
https://myshop.com/shoes
Meaning: A full address like this is called a URL. It holds three parts. https:// is how to send it (the protocol). myshop.com is the name of the place (the domain). /shoes is the way inside that place (the path): the page that is wanted.
⚡ Who reads which part
Guess first: of the three parts of the URL https://myshop.com/shoes, which part does the browser use to ask DNS?
myshop.com, the name of the place. DNS and the routers on the road don't read the path /shoes. MyShop's server reads the path, to know which page is wanted.
Meaning: If you change /shoes to /bags, you still go to the same shop, but you ask for another page.
⚡ A door number nobody writes
Meaning: A number after the domain name, such as myshop.com:443, is the door number (the port) on the server. The browser already knows that https uses door 443 and http door 80, so the door number usually isn't written.