← IGCSE Computer Science Paper 1

The domain name server (DNS) and IP addresses

A domain name server translates a domain name typed in a browser, such as example.com, into the IP address of the web server that holds the website.

Understanding The domain name server (DNS) and IP addresses in IGCSE Computer Science Paper 1

What it does: Every lookup starts with the browser asking the DNS server to find the domain name it was given. The DNS server finds the matching IP address and sends it back so the browser can request the website from that web server. A domain name is text that is easy for people to remember. 192.168.10.25 is an IP address made of numbers. Computers do use IP addresses to find each other. The DNS lets people type memorable names instead of long numbers. The DNS only translates names to IP addresses. Encryption is done by protocols such as SSL/TLS. The browser trusts the IP address it is given. A wrong one leads to another site, which is how pharming attacks work.

Common mistakes: The variable should hold a domain name such as www.example.com. The value written is an IP address, which is what the DNS lookup should return. The browser only knows the domain name the user typed, so it sends the domain name to the DNS server. It does not already have the IP address.

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 520–546) and word search (Modules 510–546).

Take this worksheet further — free with Cloodit

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

Learning
Duo
What does a DNS server do when you type a domain name into a browser?
It stores a copy of the whole website on the DNS serverIt translates the domain name into the IP address of the web server
Matches
The DNS server stores the website's web pages and sends them to the browser.
↓
The DNS server only translates the domain name into an IP address. The web server holds the website and sends the pages.
Applying
Meanings
Term
DNS server
Meaning
A domain name server translates a domain name typed in a browser, such as example.com, into the IP address of the web server that holds the website.
Practice
domain ← "example.com"
Testing
Gaps
domain name -> server -> IP address
Check Answer
Spots
1domain ← "93.184.216.34"
2ip ← DNS_LOOKUP(domain)

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

The 'Bear' badge — Forest Guardian, 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. What does a DNS server do when you type a domain name into a browser?
A. It translates the domain name into the IP address of the web server ✓
B. It stores a copy of the whole website on the DNS server
A DNS server looks up the domain name and returns the IP address. The website itself is held on a web server.
2. Which of these is a domain name?
A. 192.168.10.25
B. www.example.com ✓
A domain name is text that is easy for people to remember. 192.168.10.25 is an IP address made of numbers.
3. Which of these is an IP address?
A. 203.0.113.42 ✓
B. www.school.org
An IP address is a set of numbers that identifies a device or server on a network. www.school.org is a domain name.
4. Why do we use domain names instead of typing IP addresses?
A. Names are easier for people to remember than numbers ✓
B. Computers cannot read IP addresses
Computers do use IP addresses to find each other. The DNS lets people type memorable names instead of long numbers.
5. What is the first step in a DNS lookup?
A. The browser sends the IP address to the DNS server
B. The browser sends the typed domain name to a DNS server ✓
The user only types the domain name, so the browser asks the DNS server which IP address matches it.

Match the Pairs

www.example.com → A domain name: the easy-to-remember text a user types into a browser to reach a website
93.184.216.34 → An IP address: the number that identifies the web server holding the website
Step 1 of a DNS lookup: the browser sends the typed domain name to the DNS server → browser -> DNS server: www.example.com?
Step 2 of a DNS lookup: the DNS server replies with the IP address of the web server → DNS server -> browser: 93.184.216.34
The DNS server stores the website's web pages and sends them to the browser. → The DNS server only translates the domain name into an IP address. The web server holds the website and sends the pages.
If the DNS server returns a wrong IP address, the browser still shows the correct website. → A wrong IP address sends the browser to a different web server, so the user may see a different or fake site.

Key Term

DNS server
A domain name server translates a domain name typed in a browser, such as example.com, into the IP address of the web server that holds the website.

Fill in the Blanks

1. domain name -> DNS server -> IP address
Hint: Type the abbreviation for the server that translates a domain name into an IP address
2. www.example.com is a domain name
Hint: Type the term for the human-readable website name typed into a browser
3. DNS server returns the IP address
Hint: Type the term for the number that identifies the web server holding the website
4. INPUT url ip ← DNSTable[url] OUTPUT ip
Hint: Type the variable that holds the domain name being looked up
5. correctIP ← "93.184.216.34" IF ip ≠ correctIP THEN OUTPUT "Wrong site"
Hint: Type the operator that checks whether the two IP addresses are different

Spot the Error

Question 1
A domain ← "93.184.216.34"
B ip ← DNS_LOOKUP(domain)
C OUTPUT ip
D CONNECT(ip)
Line A — The variable should hold a domain name such as www.example.com. The value written is an IP address, which is what the DNS lookup should return.
Question 2
A Browser sends IP to DNS
B DNS finds the IP address
C Browser contacts web server
Line A — The browser only knows the domain name the user typed, so it sends the domain name to the DNS server. It does not already have the IP address.
Question 3
A Type example.com in browser
B Browser asks the DNS server
C DNS server returns the IP
D Browser connects to DNS server
Line D — After the DNS server returns the IP address, the browser connects to the web server at that address. The DNS server does not hold the website.
Question 4
A dns ← DNS_SERVER()
B domain ← "example.com"
C ip ← dns.LOOKUP(domain)
D CONNECT(domain)
Line D — The connection to the web server uses the IP address returned by the lookup, so it should be CONNECT(ip), not the domain name.
Question 5
A Browser gets IP from DNS
B The IP address is wrong
C Browser loads the same site
Line C — If the IP address is wrong, the browser contacts a different web server. It will load a different website, not the one the user wanted.

Student with a class code? Join your class →