Why domain names are used instead of IP addresses

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

Why domain names are used instead of IP addresses

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Why do websites use domain names like example.com as well as IP addresses?
A Computers find names faster than numbers
B Names are easier for people to remember than numbers
2. Which does a computer need in order to locate a web server on the internet?
A The numeric IP address
B The domain name alone
3. Which of these is the easier address for a person to remember?
A www.bbc.co.uk
B 151.101.0.81
4. What must happen to a domain name before the browser can contact the web server?
A It must be converted into a URL
B It must be converted into an IP address
5. How many IP addresses does one domain name match to?
A One domain name matches one IP address
B One domain name matches every IP address on the internet

Match the Pairs

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

Left columnRight column
1www.example.com Ahttps://www.bbc.co.uk instead of https://151.101.0.81
293.184.216.34 Bwww.shop.com: 203.0.113.5 changes to 203.0.113.9
3People find names easier to remember than numbers, so a website is typed as a name rather than as numbers CA domain name: easy for people to remember and type instead of a number
4The IP address of a server can change, but the domain name stays the same so users are not affected DAn IP address: the numeric address computers actually use to find a web server
5A computer uses www.example.com directly to find the web server EThe domain name stays the same when the IP address changes. Only the address linked to the name is updated, so users notice nothing.
6If a website changes its IP address, everyone must learn a new domain name FComputers cannot use a domain name directly. The name must first be converted into a numeric IP address, which is used to find the server.

Definitions

domain name

Fill in the Blanks

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

1.
www.example.com is a ___________
2.
93.184.216.34 is an __________
3.
1 domain name = _ IP address
4.
Name stays the ____, IP address can change
5.
A ___ server converts names into IP addresses

Spot the Error

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

Question 1
A dns = {}
B dns["example.com"] = "93.184.216.34"
C name = "example.com"
D ip = dns[ip]
Question 2
A table = {}
B table["shop.com"] = "10.0.0.5"
C print(table["10.0.0.5"])
Question 3
A site = example.com
B ip = lookup(site)
C print("Connecting to", ip)
Question 4
A name = "shop.com"
B dns["10.0.0.5"] = name
C dns[name] = "10.0.0.9"
D print(name)
Question 5
A name = "bank.com"
B ip = dns(name)
C print("IP is", ip)

Answer Key

Why domain names are used instead of IP addresses
Section A: Quick Questions
Q1
B — Names are easier for people to remember than numbers
Q2
A — The numeric IP address
Q3
A — www.bbc.co.uk
Q4
B — It must be converted into an IP address
Q5
A — One domain name matches one IP address
Section B: Match the Pairs
Q1
www.example.com → A domain name: easy for people to remember and type instead of a number
Q2
93.184.216.34 → An IP address: the numeric address computers actually use to find a web server
Q3
People find names easier to remember than numbers, so a website is typed as a name rather than as numbers → https://www.bbc.co.uk instead of https://151.101.0.81
Q4
The IP address of a server can change, but the domain name stays the same so users are not affected → www.shop.com: 203.0.113.5 changes to 203.0.113.9
Q5
A computer uses www.example.com directly to find the web server → Computers cannot use a domain name directly. The name must first be converted into a numeric IP address, which is used to find the server.
Q6
If a website changes its IP address, everyone must learn a new domain name → The domain name stays the same when the IP address changes. Only the address linked to the name is updated, so users notice nothing.
Section C: Definitions
Q1
domain name — An easy-to-remember name, like example.com, that stands in for a numeric IP address. It must be converted into the IP address before the computer can find the web server.
Section D: Fill in the Blanks
Q1
www.example.com is a domain name
Q2
93.184.216.34 is an IP address
Q3
1 domain name = 1 IP address
Q4
Name stays the same, IP address can change
Q5
A DNS server converts names into IP addresses
Section E: Spot the Error
Q1
D — The DNS table is keyed by domain name, and ip does not exist yet. The lookup must use the name: ip = dns[name].
Q2
C — Each domain name matches one IP address, so the name is the key you look up. It should be print(table["shop.com"]), which returns the IP.
Q3
A — The domain name is text, so it must be in quotes: site = "example.com".
Q4
B — The name is the key and the IP address is the value. It should be dns[name] = "10.0.0.5". The IP can later be changed while the name stays the same.
Q5
B — dns is a table (dictionary), so you look up a name with square brackets: ip = dns[name]. Round brackets would try to call it like a function.