Book an info sessionInfo session

The Internet: DNS, HTTP, and web technologies

Cambridge A-Level Computer Science (9618) · lesson 10 of 15 · 25 min

DNS in Depth

The DNS hierarchy has four levels of servers:

  • Root servers: 13 logical root server clusters worldwide; know the addresses of all TLD servers.
  • TLD servers: Handle top-level domains (.com, .uk, .org). Managed by registries.
  • Authoritative servers: Hold the actual DNS records for specific domains.
  • Recursive resolvers: Your ISP’s DNS server; queries the hierarchy on your behalf and caches results.

DNS record types: A (IPv4 address), AAAA (IPv6), MX (mail server), CNAME (alias), TXT (verification, SPF).

HTTP Methods and Status Codes

Cookies and Sessions

HTTP is stateless — each request is independent. Cookies are small text files stored by the browser that allow servers to maintain state across requests (login sessions, shopping carts, preferences).

Session cookies: Deleted when browser closes. Persistent cookies: Stored until expiry date. Secure cookies: Only sent over HTTPS. HttpOnly cookies: Not accessible to JavaScript (prevents XSS theft).

Which DNS record type maps a domain name to an IPv4 address?

  • MX
  • CNAME
  • A
  • TXT

Answer: A
An A record maps a hostname to an IPv4 address.

Which HTTP method is used to retrieve a resource without modifying it?

  • POST
  • PUT
  • DELETE
  • GET

Answer: GET
GET retrieves a resource; it should have no side effects.

An HttpOnly cookie attribute prevents:

  • The cookie being sent over HTTP
  • JavaScript from accessing the cookie
  • The cookie from being stored
  • The cookie from expiring
  • Answer: 1

HttpOnly prevents JavaScript (document.cookie) from reading the cookie, protecting against XSS attacks.


Previous lesson: Network security: encryption, firewalls, VPNs
Back to Cambridge A-Level Computer Science (9618)
Next lesson: Processor architecture: Harvard vs von Neumann