Skip to main content
SingaporeComputer ScienceSyllabus dot point

How does a domain name become an IP address, and what protocols carry web traffic?

Explain how DNS resolves domain names to IP addresses, and describe the HTTP/HTTPS request-response model and the client-server architecture

A focused answer to the H2 Computing outcome on DNS and the web. Resolving domain names to IP addresses through DNS, the HTTP and HTTPS request-response cycle, status codes, and the client-server model.

Generated by Claude Opus 4.88 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Examples in context
  4. Try this

What this dot point is asking

SEAB wants you to explain how DNS resolves domain names to IP addresses, and to describe the HTTP/HTTPS request-response model and the client-server architecture. The central idea is that the web works by name lookup followed by a request and response: DNS turns a name into an address, then a client asks a server for a resource and the server replies.

The answer

The Domain Name System

Computers route to each other by numeric IP addresses, but people use memorable domain names like example.com. The Domain Name System (DNS) translates names to IP addresses. It is:

  • distributed - records are spread across many servers worldwide, not held in one place, and
  • hierarchical - the namespace has levels: root servers, top-level domain (TLD) servers (.com, .sg), and authoritative servers for individual domains.

Resolving a name

When a browser needs the IP for a domain it has not cached:

  1. It asks a DNS resolver (often the ISP's).
  2. The resolver, if it has no cached answer, queries a root server, which points to the right TLD server, which points to the domain's authoritative name server.
  3. The authoritative server returns the IP address; the resolver caches it (for a set time) and returns it to the browser.

Caching at each level means most lookups are answered quickly without the full chain.

The client-server model

The web uses a client-server architecture: the client (browser) requests resources, and the server stores and serves them. Many clients share one server. Communication follows a request-response cycle.

HTTP request-response

HTTP is the application-layer protocol of the web:

Client request:  GET /index.html  (method + path + headers)
Server response: 200 OK + the HTML content (status + body)

The client sends a request (a method such as GET to read or POST to send data, plus the path); the server returns a status code and usually the content. HTTP is typically stateless - each request stands alone.

Status code categories: 2xx success (200 OK), 3xx redirection, 4xx client error (404 Not Found), 5xx server error (500).

HTTPS

HTTPS is HTTP over an encrypted TLS connection. It adds:

  • Confidentiality - eavesdroppers cannot read the data.
  • Integrity - data cannot be tampered with undetected.
  • Authentication - a certificate confirms the server is genuine.

This protects passwords, payments and private data, which is why it is now standard.

Examples in context

Example 1. Why a site loads faster the second time. The first visit triggers a full DNS lookup; afterwards the resolver and browser cache the IP, so subsequent visits skip the lookup chain. Caching is what makes repeat visits noticeably quicker, and explains the brief delay only on a brand-new domain.

Example 2. The padlock and online payments. A checkout page uses HTTPS so card details are encrypted in transit and the certificate proves you are talking to the real bank, not an impostor. The same HTTP request-response cycle applies, but TLS underneath guarantees no eavesdropper can read or alter the exchange.

Try this

Q1. What does DNS translate, and into what? [1 mark]

  • Cue. It translates human-readable domain names into numeric IP addresses.

Q2. Describe the request-response cycle of HTTP. [2 marks]

  • Cue. The client sends an HTTP request (method and path) to the server; the server returns a response with a status code and usually the requested content.

Q3. State two things HTTPS adds over HTTP. [2 marks]

  • Cue. Confidentiality (encryption) and integrity, plus server authentication via a certificate.

Exam-style practice questions

Practice questions written in the style of SEAB exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

Original6 marks(a) Explain the purpose of the Domain Name System (DNS). (b) Describe the steps when a browser resolves the domain name of a website it has not visited before. (c) Why is DNS often described as a distributed, hierarchical system?
Show worked answer →

(a) DNS translates human-readable domain names (such as example.com) into the numeric IP addresses that computers use to locate each other. People remember names; the network routes by IP, and DNS bridges the two.

(b) Steps to resolve a new domain name:

  1. The browser asks a DNS resolver (often run by the ISP) for the IP address of the domain.
  2. If the resolver has no cached answer, it queries the DNS hierarchy: a root server directs it to the relevant top-level domain (such as .com) server, which directs it to the domain's authoritative name server.
  3. The authoritative server returns the IP address, the resolver caches it and returns it to the browser, which then connects to that IP.

(c) DNS is distributed because no single server holds all records - they are spread across many servers worldwide - and hierarchical because the namespace is organised in levels (root, top-level domain, domain), with each level responsible for the one below. This makes it scalable and resilient.

Markers reward DNS as name-to-IP translation, the resolver-root-TLD-authoritative lookup chain with caching, and the distributed/hierarchical scalability point.

Original5 marks(a) Describe the HTTP request-response model between a browser and a web server. (b) State what HTTPS adds over HTTP and why it matters. (c) Give the meaning of one HTTP status code category.
Show worked answer →

(a) The web uses a client-server model with a request-response cycle: the browser (client) sends an HTTP request for a resource (a method such as GET and the path) to the web server; the server processes it and returns an HTTP response containing a status code and, usually, the requested content (such as an HTML page). The connection is typically stateless - each request is independent.

(b) HTTPS is HTTP carried over an encrypted (TLS) connection. It adds confidentiality (eavesdroppers cannot read the data), integrity (data cannot be altered undetected) and authentication (a certificate confirms the server's identity). It matters for protecting passwords, payments and private data from interception and tampering.

(c) A status code category (any one): 2xx success (200 OK), 3xx redirection, 4xx client error (404 Not Found), 5xx server error (500 Internal Server Error).

Markers reward the client-sends-request, server-returns-response cycle with a status code, HTTPS adding encryption (confidentiality, integrity, authentication), and one correct status-code category.

Related dot points