Topic 5 · The internet and its uses
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
- Protocol –
https(or http): the rules used to transfer the page. HTTPS is the secure version. - Domain name –
www.cswithaamir.com: identifies the web server that holds the website. - Web page / file name –
/notes/how-a-web-page-is-retrieved: the location of the page on that server.
The steps to retrieve a web page
- The user types the URL into the address bar of the web browser (or clicks a link).
- The browser sends the domain name part of the URL to a DNS server.
- 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.
- The DNS server sends the IP address back to the browser.
- The browser sends a request for the web page to the web server at that IP address.
- 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.
- The browser renders (interprets) the HTML and displays the web page on the screen.
Key definitions
- Web browser: software that requests, receives and renders web pages, e.g. Chrome or Firefox. It also stores bookmarks, history and cookies.
- DNS (Domain Name Server): a server that translates domain names into IP addresses.
- Web server: a server that stores the files for websites and sends them to browsers when requested.
- IP address: the unique address of a device on a network, used to send data to the right place.
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
- Describe the steps in the correct order and name each device: browser → DNS → IP address back to browser → web server → HTML back to browser → rendered.
- Say that the web server sends HTML – this word often earns a mark.
- Don't say the DNS server stores web pages – it only stores domain names and IP addresses.
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.