Splitting a URL into its parts

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Splitting a URL into its parts

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. In https://www.example.com/shop/index.html, which part is the protocol?
A www.example.com
B https
2. In https://www.example.com/shop/index.html, which part is the domain name?
A www.example.com
B shop/index.html
3. In https://www.example.com/shop/index.html, which part is the web page or file name?
A shop/index.html
B https://www
4. Which is the correct order of the parts of a full URL?
A Domain name, protocol, web page or file name
B Protocol, domain name, web page or file name
5. The URL www.example.com/shop/index.html is missing which part?
A The protocol
B The domain name

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1https://www.example.com/shop/index.html AThe URL has only one slash after the protocol. It should be https:// with two slashes so the protocol is separated correctly from the domain name.
2www.example.com/shop/index.html B/shop/index.html
3The protocol is the first part of a URL, written before :// Chttps
4The web page or file name is the last part of the URL, after the domain name DThe colon after the protocol is missing. It should be https:// so that the protocol is correctly separated from the domain name.
5https:/www.example.com/index.html EA URL with the protocol missing: only the domain name and the web page or file name are given
6https//www.example.com/index.html FA full URL with all three parts: protocol (https), domain name (www.example.com) and web page or file name (shop/index.html)

Definitions

https://www.example.com/shop/index.html

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
_____://www.example.com/shop/index.html
2.
https://_______________/shop/index.html
3.
https://www.example.com/_______________
4.
https___www.example.com/index.html
5.
protocol = "https" ______ = "www.example.com" page = "shop/index.html"

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A URL: https:/www.ex.com/a.html
B Protocol: https
C Domain: www.ex.com
D File: a.html
Question 2
A URL: http://shop.com/buy.html
B Protocol: http
C Domain: shop.com/buy.html
D File: buy.html
Question 3
A URL: https://uk.com/home.html
B Protocol: https
C Domain: uk.com
D File: uk.com
Question 4
A URL: https://www.ex.com
B Protocol: https
C Domain: https
D File: none given
Question 5
A URL: https://www.ex.com/a.html
B Domain: www.ex.com
C File: a.html
D Protocol: https://

Answer Key

Splitting a URL into its parts
Section A: Quick Questions
Q1
B — https
Q2
A — www.example.com
Q3
A — shop/index.html
Q4
B — Protocol, domain name, web page or file name
Q5
A — The protocol
Section B: Match the Pairs
Q1
https://www.example.com/shop/index.html → A full URL with all three parts: protocol (https), domain name (www.example.com) and web page or file name (shop/index.html)
Q2
www.example.com/shop/index.html → A URL with the protocol missing: only the domain name and the web page or file name are given
Q3
The protocol is the first part of a URL, written before :// → https
Q4
The web page or file name is the last part of the URL, after the domain name → /shop/index.html
Q5
https:/www.example.com/index.html → The URL has only one slash after the protocol. It should be https:// with two slashes so the protocol is separated correctly from the domain name.
Q6
https//www.example.com/index.html → The colon after the protocol is missing. It should be https:// so that the protocol is correctly separated from the domain name.
Section C: Definitions
Q1
https://www.example.com/shop/index.html — A URL splits into protocol (https), domain name (www.example.com) and web page or file name (shop/index.html). Each part can be labelled.
Section D: Fill in the Blanks
Q1
https://www.example.com/shop/index.html
Q2
https://www.example.com/shop/index.html
Q3
https://www.example.com/shop/index.html
Q4
https://www.example.com/index.html
Q5
protocol = "https" domain = "www.example.com" page = "shop/index.html"
Section E: Spot the Error
Q1
A — The URL is written wrongly. The protocol must be followed by :// (colon and two slashes), so it should be https://www.ex.com/a.html.
Q2
C — The domain name is only shop.com. The /buy.html part is the web page or file name, so the line should be Domain: shop.com.
Q3
D — uk.com is the domain name, not the file name. The web page or file name is home.html, so the line should be File: home.html.
Q4
C — https is the protocol, not the domain name. This URL has no file name, but the domain name is www.ex.com, so the line should be Domain: www.ex.com.
Q5
D — The protocol is just https. The :// is the separator between the protocol and the domain name, not part of the protocol. It should be Protocol: https.