URLs
Uniform Resource Locators (URLs) are the addresses of the web. They are a shared format that programs can use to locate resources somewhere on the web.
URLs are made of these parts:
- Scheme: the protocol to use to request the resource
- Authority (Domain and Port): what server to request to get the resource
- Path: what resource is requested
- Parameters: key/value pairs, like the 'arguments' to a request
- Anchor: a 'bookmark' to a location within the resource
This video demonstrates the parts of a URL
This video explains more about the Query parameters of a URL
Why is URL Structure Important?
-
Resource Identification: URLs uniquely identify and locate web resources. Each URL corresponds to a specific resource on the web.
-
Navigation: URLs enable users to navigate the web. Users can enter URLs into their web browsers to access web resources.
-
Data Transfer: URLs facilitate the transfer of data between client and server. They can include query parameters that provide additional information to the server.
-
SEO: Proper URL structure can improve search engine optimization (SEO). Descriptive URLs help search engines understand the content of the web page.
Check your understanding
-
What are the parts of a URL?
-
Look at the current url in your browser. Identify the parts of the URL. What parts are missing or have their default values?
-
Challenge: Which part of the network pays attention to each part of a URL?
Further reading: URLs
Check out the MDN page What is a URL