← IGCSE Computer Science Paper 1

Splitting a URL into its parts

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.

Understanding Splitting a URL into its parts in IGCSE Computer Science Paper 1

What it does: https comes before :// and tells the browser which set of rules to use to fetch the page. Everything after the domain name, starting with the first single /, shows which page or file is wanted. The protocol must be followed by :// (a colon and two slashes). The wrong URL only has one slash. The second URL is missing the colon after https. It should be https:// so the protocol is clearly separated. Without https:// at the start there is no protocol part, so only two of the three parts can be labelled.

Common mistakes: 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. 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.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 464–476) and word search (Modules 464–489).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
In https://www.example.com/shop/index.html, which part is the protocol?
www.example.comhttps
Matches
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.
Applying
Meanings
Term
https://www.example.com/shop/index.html
Meaning
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.
Practice
https://www.example.com/shop/index.html
Testing
Gaps
://www.example.com/shop/index.html
Check Answer
Spots
1URL: https:/www.ex.com/a.html
2Protocol: https

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Cosmic Owl' badge — Comprehension Guru, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. In https://www.example.com/shop/index.html, which part is the protocol?
A. www.example.com
B. https ✓
The protocol comes first, before ://. Here it is https. www.example.com is the domain name.
2. In https://www.example.com/shop/index.html, which part is the domain name?
A. www.example.com ✓
B. shop/index.html
The domain name sits between :// and the next /. shop/index.html is the web page or file name part.
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
Everything after the domain name and its first / points to the page or file, here shop/index.html.
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 ✓
A URL always starts with the protocol, then the domain name, then the page or file name.
5. The URL www.example.com/shop/index.html is missing which part?
A. The protocol ✓
B. The domain name
There is no https:// at the start, so the protocol is missing. The domain name and file name are still there.

Match the Pairs

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)
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
The protocol is the first part of a URL, written before :// → https
The web page or file name is the last part of the URL, after the domain name → /shop/index.html
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.
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.

Key Term

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.

Fill in the Blanks

1. https://www.example.com/shop/index.html
Hint: Type the protocol, the first part of the URL, which shows the secure way the page is sent.
2. https://www.example.com/shop/index.html
Hint: Type the domain name, the part between the :// and the first slash.
3. https://www.example.com/shop/index.html
Hint: Type the web page or file name part that comes after the domain name.
4. https://www.example.com/index.html
Hint: Type the three characters that separate the protocol from the domain name.
5. protocol = "https" domain = "www.example.com" page = "shop/index.html"
Hint: Type the label for the URL part that names the website.

Spot the Error

Question 1
A URL: https:/www.ex.com/a.html
B Protocol: https
C Domain: www.ex.com
D File: a.html
Line 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.
Question 2
A URL: http://shop.com/buy.html
B Protocol: http
C Domain: shop.com/buy.html
D File: buy.html
Line 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.
Question 3
A URL: https://uk.com/home.html
B Protocol: https
C Domain: uk.com
D File: uk.com
Line 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.
Question 4
A URL: https://www.ex.com
B Protocol: https
C Domain: https
D File: none given
Line 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.
Question 5
A URL: https://www.ex.com/a.html
B Domain: www.ex.com
C File: a.html
D Protocol: https://
Line 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.

Student with a class code? Join your class →