All subjects · Computer Science · WCP03 Advanced Principles of Computer Science
The Domain Name System (DNS)
Edexcel IAL Computer Science · WCP03 Advanced Principles of Computer Science
People remember names like example.com; computers route by IP address. DNS is the internet's distributed directory that translates one into the other.
What DNS does
The Domain Name System translates domain names into IP addresses. Domain names are hierarchical, read right to left: in www.example.co.uk, '.uk' is the top-level domain (TLD), 'co' is a second-level domain, 'example' is the registered name and 'www' is a host. A fully qualified domain name names one specific host.
How a lookup works
1. The browser checks its own cache, then the operating system's cache.
2. If not found, the request goes to a recursive resolver (usually run by the ISP).
3. The resolver asks a root name server, which replies with the address of the right TLD server (for example, for .uk).
4. The resolver asks the TLD server, which replies with the address of the domain's authoritative name server.
5. The authoritative server returns the IP address.
6. The resolver returns it to the browser and caches it for a set time (its TTL); the browser then connects to that IP address.
| Step | Asks | Gets back |
|---|---|---|
| 1 | Local cache | Miss |
| 2 | Recursive resolver | Takes over the search |
| 3 | Root server | Address of the .uk TLD server |
| 4 | TLD server | Address of example.co.uk's authoritative server |
| 5 | Authoritative server | IP address of www.example.co.uk |
Benefits and drawbacks
Benefits: people use memorable names; a site can move to a new IP address without users noticing; the system is distributed and hierarchical, so no single server holds everything and it scales; caching makes repeat lookups fast and reduces load.
Drawbacks: if DNS fails, sites become unreachable by name; cached records may be out of date after a change; attacks such as DNS cache poisoning (planting false records to send users to fake sites) and denial of service against DNS servers; lookups add a small delay.
Worked example
Why does the second visit to a website usually load faster than the first?
- On the first visit, a full DNS lookup is needed: resolver, root, TLD, authoritative server.
- The result is cached by the browser, OS and resolver.
- On the second visit, the IP address comes straight from a cache, so no lookup through the hierarchy is needed.
Answer: Cached DNS results remove the lookup delay.
Check yourself
- What is the main job of DNS?
- Translating domain names into IP addresses
- Routing packets between networks
- Encrypting web traffic
- Assigning MAC addresses
Show answer
Translating domain names into IP addresses. DNS is the internet's directory service.
- In www.shop.example.org, what is the top-level domain?
- www
- shop
- .org
- example
Show answer
.org. The TLD is the rightmost part.
- What does a root name server return to a resolver?
- The address of the name server for the top-level domain
- The IP address of the website
- The web page itself
- A digital certificate
Show answer
The address of the name server for the top-level domain. Root servers point the way down the hierarchy.
- Which server holds the definitive IP address record for a domain?
- The root server
- The user's router
- The browser
- Its authoritative name server
Show answer
Its authoritative name server. The authoritative server is the final source of truth.
- Why do resolvers cache DNS results?
- To keep the records secret
- To answer repeat requests quickly and reduce load on the DNS hierarchy
- Because root servers forget records
- To encrypt the IP address
Show answer
To answer repeat requests quickly and reduce load on the DNS hierarchy. Caching is a large part of why DNS scales.
- What is DNS cache poisoning?
- Deleting a domain name
- Overloading a web server with requests
- Encrypting DNS queries
- Inserting false records into a DNS cache so users are sent to the wrong IP address
Show answer
Inserting false records into a DNS cache so users are sent to the wrong IP address. Users typing the right name could land on a fake site.
- Why is DNS designed as a distributed hierarchy rather than one central list?
- Domain names change every few seconds
- No single server could handle every request, and a single server would be a single point of failure
- IP addresses are secret
- It makes lookups slower but cheaper
Show answer
No single server could handle every request, and a single server would be a single point of failure. Distribution gives scale and resilience.
Sources
- Pearson Edexcel International Advanced Subsidiary and Advanced Level in Computer Science specification (2026), Issue 1
- Pearson Edexcel IAL Computer Science sample assessment materials (Unit 3 paper, resource booklet and mark scheme)
Last updated 8 November 2026. Spotted a mistake? Tell us.