In this lesson, students will get a chance to learn the parts of a URL and explore URLs that they find on wikipedia, identifying how the URL can change based on what you are doing on the site, such as clicking citations and searching.
URL or Uniform Resource Locator, is what is colloquially called a web address. It’s a string of text that directs a web browser to a particular web page.
Protocol is the way of defining how this address should be interpreted and communicated with. Most of the time when you’re looking at a web page, you want the browser to interpret it’s hypertext, so you would use HTTP, which stands for hypertext transfer protocol.
Hostname, sometimes called Domain Name is the root address of the website.
The Path comes comes after the domain, and represents and folder structure like pathway to the page. The last part of the path (separated by forward slashes) is the page name. Sometimes this will be an actual file, other times just a function name.
The syntax of a URL is as follows:
Additionally, sometimes a URL will have parameters. This is information that is passed to the server to inform what gets displayed on the page. These parameters come after the path and are denoted by a question mark, then a parameter name, then an equals sign, and finally the value of the parameters. Multiple parameters are separated by an Ampersand
Youtube uses parameters to Identify the ID of the video you are watching.
The google store uses the path organize it’s pages:
In the YouTube example, “www” stands for World Wide Web, and is an artifact of older web technologies, it isn’t usually needed anymore.
In the Google Store example, the “store” is what’s called a subdomain. It’s a part of the wider Google domain, but it’s a unique site.
Ask all student to take out a paper and write down what they think URL stands for. If they don’t know, make something up!
Take a quick poll and write down some of the more interesting choices on the board.
Ask a student to come up to the board and see if they can write a URL on the board from memory. It can be anything, but keep asking students to come up until you get one that is syntactically correct, even if it isn’t a real page.
Lead a discussion on what is a URL, and the parts that make it up, ensure students understand the Syntax. Use the examples provided.
Use the examples students provided on the projector to illustrate using URLs and how they work.
Parameter Deep Dive
Go to Google and perform a search. For example:
After you hit enter, take a look at the URL:
The result above is only part of what the URL contains, but it can be used to illustrate how parameters can appear in a URL in a large example. Can you identify some of the parameters?
These are all parameters that google uses to correctly perform the search.
In case you were wondering, this puppy is the cutest:
Have students pair off and give each the worksheet.
Each student writes both their name and their partner name on their sheet. Students will complete each section, trading their papers back and forth as the instructions imply.
Give students 10 minutes or so to complete the sheet.
Pick a few partner sets to talk about the different designs they took on picking URLs for their class site. Why did they make the decisions they did.
Make sure to point out that although URLs share a common syntax, the actual URL can depend on lots of things:
Here’s a good video on URLs:
Also look at: