Domain Name System (DNS) (OCR A Level Computer Science)
Revision Note
Written by: Neil Southin
Reviewed by: James Woodhouse
Domain Name System (DNS)
What is the Domain Name System?
The Domain Name System (DNS for short) can be thought of as the Internet's equivalent to a phone book
It is essentially a directory of domain names and is used to translate human-readable domain names to the numeric IP addresses that computers use
When you type a URL into your browser, the DNS translates the domain name into its associated IP address so your computer can connect to the server hosting the website
Without DNS, we would have to remember the IP address of every site we want to visit
When a domain is newly registered, or a server changes its IP address, the DNS record for that domain needs to be updated in what's known as DNS propagation
Components of DNS
DNS resolver
The first stop in the DNS lookup process, usually provided by your internet service provider (ISP) or a third-party service like Google DNS or OpenDNS
Root servers
The resolver asks a DNS root server to find the top-level domain (like .com, .org, .edu)
TLD (Top-Level Domain) servers
The root server directs the resolver to a TLD server, which stores the information of the domain
Authoritative DNS servers
The TLD server then responds with the IP address of the domain's authoritative DNS server, which the resolver asks for the IP of the domain
Benefits of DNS
DNS allows us to use easily remembered domain names instead of hard-to-remember IP addresses
DNS servers handle the mapping between domain names and IP addresses, relieving end users and system administrators from the task
What happens when you type a URL into a web browser?
URL Entry: The user enters the URL of a website into the web browser
The computer checks its local cache to see if it contains the IP address of the URL from a previous request
DNS Query: The web browser sends a query to a DNS server (usually hosted by your ISP) to translate the URL (domain name) into an IP address
DNS Resolver: The DNS resolver checks its cache to see if it has the IP address for the requested domain. If not, it sends the request to the DNS root servers
Root Server Query: The root server directs the resolver to a Top-Level Domain (TLD) server (like .com, .org) based on the extension of the URL
TLD Server Query: The TLD server then provides the resolver with the IP address of the domain's authoritative DNS server
Authoritative Server Query: The resolver queries the authoritative DNS server for the IP address of the domain
Retrieve IP Address: The authoritative DNS server responds with the IP address for the requested domain
Request the Web Page: The web browser sends an HTTP or HTTPS request to the IP address it received
Server Response: The server at the given IP address processes the request and sends back the data for the web page (HTML, CSS, JavaScript, etc.)
Render the Web Page: The web browser renders the received data into the web page that you see
DNS (Domain Name System) translates human-friendly URLs into computer-friendly IP addresses
HTTP/HTTPS are protocols defining how messages are formatted and transmitted on the World Wide Web
The entire process happens in a matter of milliseconds, making the web user-friendly and efficient
Worked Example
Shreya is a web developer who creates web pages for a variety of different companies.
In order to view a website, a user enters a website address into their web browser such as http://www.ocr.org.uk. The website will then be displayed onto the user’s screen.
Explain how the Domain Name System (DNS) plays a role in websites being loaded.
4 marks
How to answer this question:
Since this question is worth 4 marks you need to explain how the DNS system works rather than just state what it does
Answer:
Example answer that would get full marks:
The DNS is a distributed system that finds the IP address of a particular URL.
The first thing that happens is that the URL is sent to a computer called a DNS resolver.
This checks its cache to see if it has already looked up this URL. If it hasn’t it will then ask a top-level domain name server (TLD), which again checks its cache to see if it has done this lookup before.
If not it will then continue on and ask the authoritative name server for that domain.
Last updated:
You've read 0 of your 5 free revision notes this week
Sign up now. It’s free!
Did this page help you?