Communication
URLs and the DNS
What you need to be able to do
- 2.1Explain how a Uniform Resource Locator (URL) is used to locate a resource on the World Wide Web.
- 2.1Explain the role of the Domain Name Service (DNS).
You need: IP addresses and the internet and the WWW. This is the last page of the chapter.
What a URL is
Example: https://www.cie.org.uk/
| Part | In the example | Meaning |
|---|---|---|
| Protocol (scheme) | https:// | the rules for fetching it: HTTP, or HTTPS (encrypted) |
| Domain name | www.cie.org.uk | the name of the web server; read right to left: top-level domain (.uk), second-level (org / cie), subdomain / host (www) |
| Path / file name | /qualifications/ | the folders and the file on that server |
People remember names; routers need numbers. The domain name in a URL must be turned into the server's IP address before any packet can be sent: that is the job of the DNS.
The Domain Name Service (DNS)
- The user types a URL (or clicks a link). The browser checks its cache for that domain's IP address.
- The browser parses the URL, splitting it into its parts (protocol, domain name, path).
- If the IP address isn't cached, the browser sends the domain name to a DNS server (usually the ISP's) to find the IP address.
- The DNS server looks the name up in its database; if it doesn't have the entry, it passes the request on to another DNS server higher up the hierarchy, until one that knows replies.
- The DNS server returns the matching IP address to the browser (if no server knows the name, an error is returned and the page isn't found).
- The browser connects to the web server at that IP address and sends a request for the resource (the path in the URL), using HTTP / HTTPS.
- The web server sends the page back; the browser renders and displays it. The IP address is stored in the browser's cache for next time.
Case by case
1 Split a URL
Identify the protocol, domain name and path in https://
Askedthree partsKnowscheme :// domain / pathRoutesplit at :// and the first /
- Protocol: https
- Domain name: notes.
example. (top-level domain .pk)edu. pk - Path: /
physics/ forces. html
2 Second visit
A user visits the same site again an hour later. Why is the page found faster?
AskedreasonKnowthe IP was cachedRouteno DNS lookup needed
- The IP address is already in the browser's cache, so the browser can skip the DNS lookup and contact the web server straight away
3 DNS doesn't know
The user's DNS server has no record of a new domain. What happens?
Askedwhat happensKnowDNS servers form a hierarchyRoutepass the query on
- The DNS server passes the request to another DNS server (higher in the hierarchy)
- that server returns the IP address, which is passed back to the browser (and cached by the DNS server)
- if no DNS server knows the name, an error message is returned
4 Typing an IP address
What happens if a user types http://
Askedis DNS needed?Knowthe address is already numericRouteskip DNS
- No DNS lookup is needed: the browser already has the IP address and contacts that server directly
Mark-scheme focus
Explain how the web browser uses the URL to access the web page (4 marks)
![(c) A user types a Uniform Resource Locator (URL) into the address bar of a web browser to access a web page. Explain how the web browser uses the URL to access the web page. [4]](/notes-content/9618/communication/img/9618_w25_11_q07_c.png)
- The browser checks its cache for the URL; parses the URL and splits it into its component parts B1
- The browser finds the IP address for the domain name by querying a DNS server; receives the matching IP address B1
- The browser creates a connection with the web server with the matching IP address; a request for the resource is sent to that web server B1
- The browser renders and displays the result; the IP address is stored in the browser cache B1
- “The DNS sends the web page”
- “The router finds the IP address”
- Skipping the request to the web server
The marks follow the order of events: cache → parse → DNS query → IP returned → connect / request → render.
From: 9618/11/O/N/25 Q7(c)
- URL / DNS: less common in 2021-25 (once as 4 marks), but central to how the WWW works and a likely longer question.
- Order matters: give the steps in sequence, each as a separate point.
Worked examples
Example 1 · The role of the DNS (Past-paper style, 3 marks) ★ Easy
Explain the role of the Domain Name Service (DNS) when a user enters a URL into a web browser.
- [3]
The DNS's job only: what it stores, what it receives, what it returns.
- Whole3 points
5 Now solve it have a go on paper first, then open the worked solution
- DNS servers store domain names and their matching IP addresses B1
- The browser sends the domain name from the URL to a DNS server; if it isn't found, the request is passed to another DNS server B1
- The DNS server returns the IP address of the web server to the browser, which then requests the page from that IP address B1
None of the points has the DNS sending the page ✓.
Example 2 · Parts of a URL (Past-paper style, 3 marks) ★ Easy
A student opens the URL https://
Identify the protocol, the domain name and the file path in this URL.
- [3]
Split at “://” and at the first “/” after the domain.
- Whole3 parts
5 Now solve it have a go on paper first, then open the worked solution
- Protocol: https B1
- Domain name: www.
school. B1edu. pk - Path: /
timetables/ B1year12. pdf
✓
Summary
- URL = protocol + domain name + path: where a resource is on the WWW.
- DNS = servers mapping domain names to IP addresses; queries are passed up the hierarchy if unknown.
- Browser: cache → parse URL → DNS query → IP address → request to web server → render; IP cached.
| If you see… | do this |
|---|---|
| “how is the URL used” | the steps in order, browser and DNS |
| “role of DNS” | stores names ↔ IPs, returns the IP (passes on if unknown) |
Can I do this?
- I can identify the protocol, domain name and path in a URL.
- I can explain the role of DNS servers.
- I can explain, in order, how a browser uses a URL to fetch a page.
Anything unticked: revise that section first. All ticked: take the quiz.
Quiz
The multiple-choice and guided questions need JavaScript. The concept checks and exam practice below work without it.
Concept checks
Answer each one in your head first, then open it.
1If a DNS server went down, could you still reach a site?Show answer
Only if its IP address was already cached, or you typed the IP address directly; otherwise the name can't be resolved.
2Why are DNS answers cached?Show answer
So repeated visits don't need a lookup every time: faster pages and less load on DNS servers.
Exam-style practice
New questions, not used above. Do them on paper, then mark your work against the official mark scheme.
A user clicks a link to https://
- (a)Identify the domain name in this URL.[1]
- (b)Describe how the DNS is used to locate the web server.[3]
Show the mark scheme
| Part | Answer / working | Marks | Guidance |
|---|---|---|---|
| (a) | www.museum.org | B1 | |
| (b) | The browser sends the domain name to a DNS server | B1 | |
| The DNS server looks up the matching IP address (passing the request to another DNS server if it's not found) | B1 | ||
| The IP address is returned to the browser, which uses it to contact the web server | B1 | ||
| Total: 4 marks | |||
Your progress on this note is saved when JavaScript is on.