Public App


Category: Web Technologies PBL

DNS Functions Explained

DNS, or Domain Name System, is a hierarchical and distributed naming system that translates human-readable domain names into IP addresses used by computers to identify and communicate with each other on the internet. The DNS system performs several critical functions, including:

  1. Domain name resolution: The primary function of DNS is to translate human-readable domain names, such as, into IP addresses, such as This enables computers to locate the correct server for the requested website and establish a connection to it.

Example: When you type a website address into your web browser, such as, the browser sends a DNS query to a DNS server to obtain the IP address associated with that domain name. The DNS server responds with the IP address, and the browser establishes a connection to the web server at that address.

  1. Load balancing: DNS can be used to distribute incoming network traffic across multiple servers, ensuring that no single server becomes overwhelmed and the website remains available to users.

Example: A popular e-commerce site might have multiple servers spread across different regions to ensure that users can access the site quickly from anywhere in the world. DNS can be configured to distribute traffic across these servers based on the user’s location, ensuring that each server is used efficiently and the site remains responsive.

  1. Email routing: DNS can also be used to route email messages to the correct email server for a particular domain.

Example: When you send an email to someone at, your email provider uses DNS to determine the MX (mail exchange) record associated with that domain. The MX record specifies the email server responsible for handling email for that domain, and your email is routed to that server.

  1. Domain name registration: DNS also plays a role in the process of registering and managing domain names.

Example: When you register a domain name, you must provide the DNS server information for that domain. This allows other computers on the internet to look up the IP address associated with your domain name and connect to your website or other services.

In summary, DNS plays a crucial role in translating human-readable domain names into machine-readable IP addresses, load-balancing network traffic, routing email messages, and managing domain name registration.

The Structure of HTTP Response

The HTTP (Hypertext Transfer Protocol) response message is sent by the server to the client in response to an HTTP request. The HTTP response message consists of several parts, including:

Status line

This is the first line of the HTTP response message, and it specifies the HTTP version, status code, and reason phrase of the response. For example:

HTTP/1.1 200 OK

In this example, the HTTP version is “HTTP/1.1”, the status code is “200”, and the reason phrase is “OK”.

Response headers

Response headers provide additional information about the response, such as the type of data being sent, the date and time of the response, and any caching instructions. Some common response headers include:

Content-Type: text/html
Date: Mon, 21 Mar 2023 14:30:00 GMT
Cache-Control: max-age=3600

Response body

The response body contains the data that the server is sending to the client, such as the contents of an HTML file or an image file. Not all HTTP responses have a response body.

The complete HTTP response message consists of the status line, response headers, and response body (if present) separated by a blank line. The structure of the HTTP response message is important for ensuring that the client can properly interpret and display the server’s response.

The Structure of HTTP Request

The HTTP (Hypertext Transfer Protocol) request message is sent by the client to the server to request a resource or perform an action. The HTTP request message consists of several parts, including:

Request line

This is the first line of the HTTP request message, and it specifies the method, URL, and HTTP version of the request. For example:

GET /index.html HTTP/1.1

In this example, the method is “GET”, the URL is “/index.html”, and the HTTP version is “HTTP/1.1”.

Request headers

Request headers provide additional information about the request, such as the type of client making the request, the type of data being sent or accepted, and the preferred language or character encoding. Some common request headers include:

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5

Request body

The request body contains any data that the client wants to send to the server, such as form data or a JSON payload. Not all HTTP requests have a request body.

The complete HTTP request message consists of the request line, request headers, and request body (if present) separated by a blank line. The structure of the HTTP request message is important for ensuring that the server can properly interpret and respond to the client’s request.

Working of Email

Email, short for electronic mail, is a digital communication method that allows users to send and receive messages over the internet. The process of sending and receiving emails involves several steps:

  1. Composing the email: The user creates an email message using an email client or web-based email service. The email message consists of a subject line, the body of the message, and one or more recipients.
  2. Addressing the email: The sender specifies the recipient’s email address in the “To” field of the email message. They can also add additional recipients in the “CC” (carbon copy) or “BCC” (blind carbon copy) fields.
  3. Sending the email: Once the email message is composed and addressed, the sender clicks the “Send” button to send the email to the recipient.
  4. Routing the email: When the email is sent, it is routed through the internet to the recipient’s email server. The email server uses a series of protocols, including SMTP (Simple Mail Transfer Protocol) and POP3 (Post Office Protocol version 3), to transmit the email.
  5. Storing the email: The recipient’s email server stores the email message in a mailbox or folder, awaiting the recipient’s request to retrieve the message.
  6. Retrieving the email: When the recipient accesses their email account, they can use an email client or web-based email service to retrieve their email messages. The email client or service connects to the email server using protocols such as IMAP (Internet Message Access Protocol) or POP3, and downloads the email messages from the server.
  7. Reading and replying to the email: Once the recipient has retrieved their email messages, they can read the message and choose to reply, forward, or delete the message.

Email can also include attachments, such as documents, images, and videos, which are sent along with the email message. Email attachments can be stored on the sender’s email server or included as a link to a file stored on a cloud-based service.

In summary, email works by allowing users to compose and send messages to other email addresses over the internet, using a series of protocols to route and transmit the email message. The recipient’s email server stores the email message until the recipient retrieves it using an email client or web-based email service. Email is a widely used and convenient method of communication for both personal and professional purposes.

Use of Protocol on the Internet

In the context of the internet, a protocol refers to a set of rules and standards that govern communication between devices and systems. Protocols are essential for enabling devices and systems to communicate and exchange information with each other in a standardized and predictable manner.

Some of the key uses of protocols on the internet include:

  1. Enabling data transmission: Protocols such as TCP (Transmission Control Protocol) and IP (Internet Protocol) are used to transmit data packets across the internet.
  2. Facilitating web communication: Protocols such as HTTP (Hypertext Transfer Protocol) and HTTPS (HTTP Secure) are used to facilitate communication between web clients (such as web browsers) and servers.
  3. Enabling email communication: Protocols such as SMTP (Simple Mail Transfer Protocol) and IMAP (Internet Message Access Protocol) are used to enable email communication between clients and servers.
  4. Facilitating file transfer: Protocols such as FTP (File Transfer Protocol) and SFTP (Secure File Transfer Protocol) are used to transfer files between systems.
  5. Enabling network security: Protocols such as SSL (Secure Sockets Layer) and TLS (Transport Layer Security) are used to secure communication between devices and systems by encrypting data transmissions.

In summary, protocols play a critical role in enabling communication and data exchange on the internet and are essential for ensuring that devices and systems can interact in a standardized and predictable manner.

Web Development Strategies

Web Server

A web server is a software application that processes and responds to client requests over the internet using the HTTP (Hypertext Transfer Protocol) or HTTPS (HTTP Secure) protocol. The primary function of a web server is to deliver web pages and other content to clients, such as web browsers, on behalf of a website.

Here are some of the main functions of a web server:

  1. Serving web pages: When a client requests a web page, the web server retrieves the page from its storage location and sends it to the client’s web browser.
  2. Handling dynamic content: Web servers can process and execute scripts or applications that generate dynamic content on the fly, such as PHP, Python, or Ruby scripts.
  3. Managing user sessions: Web servers can store and manage session information to maintain the state of a user’s interaction with a website, such as login credentials, shopping cart contents, and preferences.
  4. Managing server-side resources: Web servers can manage and allocate resources, such as CPU, memory, and disk space, to ensure efficient and reliable operation.
  5. Load balancing: Web servers can distribute incoming client requests across multiple servers to balance the workload and prevent overload.
  6. Security: Web servers can implement various security measures, such as SSL/TLS encryption, firewalls, and access control, to protect against cyber threats and unauthorized access.

Overall, the functions of a web server are crucial for delivering web content and services to clients and ensuring the reliable and secure operation of websites and web applications.

Web Client

A web client, also known as a web browser, is an application that allows users to access and interact with content on the World Wide Web. Some of the key functions of a web client include:

  1. Rendering web pages: A web browser retrieves HTML, CSS, and JavaScript files from web servers and renders them into a viewable format for the user.
  2. Navigating between pages: Web browsers allow users to navigate between different web pages by following links, typing in URLs, or using bookmarks.
  3. Running web applications: Many web-based applications, such as Google Docs and Gmail, are run entirely within a web browser.
  4. Displaying multimedia content: Web browsers can display a wide range of multimedia content, including images, videos, and audio files.
  5. Managing user preferences: Web browsers allow users to customize their browsing experience by changing settings such as font size, default search engine, and home page.
  6. Ensuring security: Web browsers employ a variety of security measures to protect users from malware, phishing, and other online threats.
  7. Interacting with web services: Many web services, such as social media platforms and online marketplaces, rely on web clients to facilitate interactions between users and their content.


A URL (Uniform Resource Locator) and a URN (Uniform Resource Name) are both types of Uniform Resource Identifier (URI) that are used to identify resources on the internet, but they differ in their purpose and format.

A URL is a type of URI that provides a specific location for a resource on the internet. It includes a protocol (such as HTTP or FTP), a domain name or IP address, and a path to the resource. URLs are used to locate and access resources such as web pages, images, and files.

For example, “” is a URL that identifies the location of an HTML file on the web server “” using the HTTPS protocol.


A URN, on the other hand, is a type of URI that provides a persistent identifier for a resource that is independent of its location. It does not include information about the location of the resource but rather identifies the resource itself. URNs can be used to identify resources such as books, articles, or images.

For example, “urn:isbn:978-0-1234-5678-9” is a URN that identifies a specific book by its International Standard Book Number (ISBN), regardless of where it is located on the internet.

In summary, URLs are used to locate and access resources on the internet, while URNs are used to provide a persistent identifier for a resource that is independent of its location.

History of Internet

The history of the internet dates back to the 1960s when the United States Department of Defense initiated a project called the ARPANET (Advanced Research Projects Agency Network) to create a decentralized communication system that could withstand a nuclear attack.

The first message transmitted over ARPANET was sent in 1969 between two computers at the University of California, Los Angeles (UCLA) and the Stanford Research Institute. The message was supposed to read “login,” but the system crashed after transmitting just the first two letters.

Over the next decade, ARPANET expanded to include more universities and research centers across the United States, and the protocol for communication evolved from a simple message transfer system to a more robust system capable of handling files and data.

In the 1980s, the National Science Foundation (NSF) developed a new network called NSFNET, which connected supercomputing centers and allowed universities and other institutions to connect to it. This network also helped to standardize protocols and led to the development of the Domain Name System (DNS) that we still use today.

In the 1990s, the World Wide Web was developed by Tim Berners-Lee, a computer scientist working at CERN, the European Organization for Nuclear Research. Berners-Lee created a way to link pages and documents on the internet using hyperlinks, and he developed the first web browser, called WorldWideWeb.

The growth of the internet exploded in the late 1990s and early 2000s, as more and more people gained access to the technology through personal computers and the development of dial-up and broadband internet connections. Today, the internet is an essential part of modern life, connecting billions of people across the world and enabling communication, commerce, entertainment, and more.

Introduction to Web and HTML

Web – As you know web is the synonym of the net this means in computer science is the web of connected computers or nodes.

HTML – HTML stands for HyperText Markup Language. It’s just a markup language that is used to show the webpage in the browser. Web pages of any website are designed using HTML.

Website – A website is a collection of web pages. The website works on HTTP and HTTPS protocols on ports 80 and 443 respectively.

Classification of websites

  • Corporate Website
  • Individual Website

Categories of websites

As web 2.0 community websites can be categorized into two parts:

  • Static
  • Interactive

Static Websites

Static websites are served and can capture information but they cannot engage with the users directly.

Interactive Website

Interactive websites can interact with the users directly and they also serves and capture information from users like static websites.