0% found this document useful (0 votes)
18 views4 pages

URLs AND DNS

Uploaded by

mohammed zayyad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views4 pages

URLs AND DNS

Uploaded by

mohammed zayyad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

INTRODUCTION

Whenever you want to browse a website, play an online game, or collect your email,
you need to access the relevant server via its specific IP address.
Most servers have a user-friendly name that saves us from having to remember its
IP address. These are called domain names and each domain name maps to a
specific IP address.
Domain names are usually chosen to represent the name of the company or
organisation that is providing a service, so they are often easy to guess. The
domain name system converts domain names to the IP addresses needed to locate
resources on the internet. This saves you from having to remember the IP
addresses.

Uniform resource locators (URLs)


A Uniform Resource Locator (URL) is the address of a webpage or other internet
resource.
As the name suggests, a URL is a standard format for allowing resources to be
accessed. A URL typically has five parts:
● scheme
● sub-domain
● second level domain
● top-level domain
● sub-directory

Figure 1: The structure of a URL


Scheme
The first part of the URL is the scheme, which is usually a protocol, that specifies
the syntax needed within the rest of the URL. In Figure 1 the scheme is https.
On the contact form of a webpage, a mailto scheme can be specified in a hyperlink,
e.g. mailto:[email protected]. When the link is clicked, the default email client
on the user's computer will open a new email with the email address of the
recipient filled in the 'to' box.

Domain name
The domain name is a hierarchy of names. In Figure 1:
● 'org' is the top-level domain
● 'raspberrypi' is the second-level domain
● 'www' is the sub-domain
The full domain name is www.raspberrypi.org. Many domain names will be made up
of more than three parts.

Sub-directory
The final part of the URL provides the path that needs to be followed on the
server to access the resource that has been requested. At the end of the path is
the file name. In Figure 1:
education/isaac/pages/quiz.html
shows that the resource is an HTML file — quiz.html — and the path to find the
resource on the server is education/Isaac/pages

Function of a web browser


A web browser checks and then interprets a URL. It sends a request to a domain
name server, which returns the corresponding IP address. It can then fetch the
resource from the web server at that IP address and display the contents to the
user.
Domain name service
The domain name service (DNS) comprises multiple domain name servers.
The role of a domain name server is to look up a domain name to find the
corresponding IP address so that content from a server located at that IP address
can be requested and sent to the user’s computer.
When a user enters a URL (e.g. https://www.raspberrypi.org/learn/index.html) into
a web browser's address bar, this sequence of events happens:
● The browser sends the domain name part of the URL, including the ‘www’
part (e.g. www.raspberrypi.org), to a domain name server. Your ISP usually provides
this.
● The domain name server checks for the URL in its lookup table
● The domain name server sends the corresponding IP address back to the
browser
● The browser sends a request for the resource identified in the path
(/learn/index.html) to the web server located at the IP address
● The resource is then returned to the browser

What happens if the URL is not in the domain name server's lookup table?
This is why the domain name system comprises multiple domain name servers.
There is a hierarchy of DNS servers based on the hierarchical structure of the
domain names.
Imagine we are looking to resolve www.raspberrypi.org
● 'org' is the Top Level Domain.
● 'raspberrypi' is the Domain.
● 'www' is the Subdomain.
If the local domain name server does not find the URL in its lookup table, it passes
the request to a top-level domain name server. There are separate servers for
most top-level domains such as '.com' , '.org' and '.uk', each administered by a
different authority. The request is therefore passed to the domain name server
for '.org'
The top-level domain name server will probably know the IP address of the full URL
'www.raspberrypi.org' and it will reply with the IP address.
However, some organisations manage all the addresses of the subdomains for their
organisations. Hence if the top-level domain name server does not know the answer,
it will know the address of the domain name server that manages all the addresses
for the raspberrypi domain. The request will now be forwarded to that server.
The raspberrypi domain name server will know the IP address of all the
sub-domains within raspberrypi such as 'www.raspberrypi.org' and it will respond
with the correct IP address.
The results may have been cached with previous requests at all stages, so a full
look-up may not happen.
All of this happens in a few milliseconds and then your device gets the IP address
it needs to access the resource.

You might also like