Cambridge A-Level Computer Science 9618 – Networks: URLs and DNS
2.1 Networks – The Internet
Objective
Explain how a Uniform Resource Locator (URL) is used to locate a resource on the World Wide Web (WWW) and describe the role of the Domain Name Service (DNS).
What is a URL?
A Uniform Resource Locator (URL) is a textual address that tells a web client (e.g., a browser) how to retrieve a specific resource from the Internet.
Components of a URL
Component
Purpose
Example
Scheme
Identifies the protocol to be used (e.g., http, https, ftp).
https
Authority
Contains optional user information, the domain name, and optional port number.
www.example.com:443
Path
Specifies the hierarchical location of the resource on the server.
/articles/ai/introduction.html
Query
Provides a string of key‑value pairs that give additional parameters to the server.
?id=42&lang=en
Fragment
Identifies a secondary resource within the primary resource, such as a section of a page.
#section2
How a URL Locates a Resource
Parsing the URL – The browser separates the scheme, authority, path, query and fragment.
Scheme handling – Determines which protocol handler to invoke (e.g., HTTP client for http/https).
Domain name resolution – The host part of the authority (e.g., www.example.com) is sent to the DNS system to obtain an IP address.
TCP/IP connection – Using the IP address (and optional port), the browser establishes a TCP connection to the server.
HTTP request – The client sends an HTTP request line that includes the path and query string.
Server response – The server returns the requested resource (HTML, image, etc.) or an error code.
Fragment handling – If a fragment identifier is present, the browser scrolls to the indicated part of the document.
Role of the Domain Name Service (DNS)
DNS is a distributed hierarchical database that translates human‑readable domain names into machine‑readable IP addresses.
Resolver process – The client’s resolver library queries a local cache, then the configured recursive resolver, which contacts authoritative name servers as needed.
Record types – Common DNS records used for web access:
A – IPv4 address.
AAAA – IPv6 address.
CNAME – Canonical name (alias).
MX – Mail exchange (not directly used for HTTP but part of the DNS ecosystem).
TTL (Time‑to‑Live) – Determines how long a DNS response may be cached before a fresh query is required.
Resolver asks the recursive DNS server for the A record of www.example.com.
Recursive server contacts the root server → TLD server for .com → authoritative server for example.com, which returns 93.184.216.34.
Browser opens a TCP connection to 93.184.216.34 on port 443 (default for HTTPS).
HTTPS handshake establishes an encrypted channel.
Browser sends an HTTP GET request:
GET /articles/ai/introduction.html?lang=en HTTP/1.1
Host: www.example.com
Server returns the HTML document; the browser renders it and scrolls to the element with id overview.
Key Points to Remember
A URL tells the browser what to request and how to request it.
DNS bridges the gap between human‑friendly domain names and the numeric IP addresses required for routing.
Caching (both in the browser and DNS) speeds up repeated accesses but can cause stale data if TTLs are too long.
Security extensions such as DNSSEC add authenticity to DNS responses, reducing the risk of spoofing.
Suggested diagram: Flowchart showing the steps from entering a URL in a browser to receiving the requested resource, highlighting the DNS lookup stage.