Topic 5 · The internet and its uses

How a web page is retrieved

Video lesson: How a web page is retrieved▶ Watch the video lessonShort, exam-focused explanation of this topic on the CS with Aamir YouTube channel.

When you type a web address into your browser, a web page appears in a second or two. Behind the scenes, your web browser, a Domain Name Server (DNS) and a web server work together. This is a very common exam question, so learn the steps in order.

The parts of a URL

A URL (Uniform Resource Locator) is a text-based address for a web page. It is easier for people to remember than an IP address. For example:

https://www.cswithaamir.com/notes/how-a-web-page-is-retrieved

The steps to retrieve a web page

  1. The user types the URL into the address bar of the web browser (or clicks a link).
  2. The browser sends the domain name part of the URL to a DNS server.
  3. The DNS server searches its database for the matching IP address. If it does not have it, it asks another DNS server, and so on, until the IP address is found.
  4. The DNS server sends the IP address back to the browser.
  5. The browser sends a request for the web page to the web server at that IP address.
  6. The web server sends the web page files back to the browser – the HTML plus any other files it needs, such as images and style sheets.
  7. The browser renders (interprets) the HTML and displays the web page on the screen.

Key definitions

Why do we need DNS?

Every web server is found using its IP address, but IP addresses are long numbers that are hard to remember. DNS lets people use easy-to-remember domain names instead, and it means a website can move to a server with a new IP address without changing its domain name.

Exam tips

Want the full topic notes, slides and worksheets? See Notes & Slides, practise with the free CS with Aamir Quiz App, or order the O Level Computer Science Study Guide.