Divyanshi Juneja Web Designer

How Does A Website Work? Role Of Browser, DNS & Server

How a website works & what is the role of Browser in it? Did you ever think that there are number of websites on the server and how the browser knows what you are searching for? Also what is DNS & what is the role of server?

So what happens, You just enter a URL and get exactly the same Web Page you wanted to see. The browser never makes a mistake of displaying some other website even when the server is occupied with countless files and websites in it.

In this post i have shared this process of website display in browser in a really simple way. What commands the browser accepts and how that command is further processed to display you the exact web page you were looking for.

Watch the video to understand the topic in 4 mins

Divyanshi Juneja’s Youtube Channel – SUBSCRIBE NOW

How Does A Website Work?

Let’s say that you visited my website i.e. divyanshijuneja.com and what you will see the information I am sharing on my website. So it seems pretty simple right! You just entered some url in browser and got the content you wanted to see. But actually it’s a long process going on server side between your request and the output you get.

Role Of Browser :

In this case the first thing you need to understand is that the browser is just taking your command, sending it to the server and then displaying you what server sends in reply to your command. So browser is just like an interpreter and has stored nothing inside it. It just connects to the server to share the relevant output with you.

How does a website works

Role Of DNS & Server:

Now the question is… When a browser send command how does the server knows what content to be shared. For example, if you type divyanshijuneja.com, How will the server find what content I am looking for. Because the server is occupied with really large amount of data.

So what really happens is that when you enter a domain name like divyanshijuneja.com, the browser contacts DNS. DNS means Domain Name System Server and is like a huge dictionary where a single domain name is connected to an IP Address and then your readable domain name is converted into the IP Address. This IP Address is sent back to the browser & browser then makes the request for this IP Address to the server. The server searches for the IP Address and then the source code stored in that IP address is sent back to the browser to display content to the user.

So it means that our website’s source code is actually stored in some IP and we get it by entering some domain name. Well its obvious that we can remember a human readable domain name for many sites and not IP Addressed.

Important Terms :

  1. DNS : Domain Name Server is like a phonebook of the internet. It stores the related IP Addresses for domain names.
  2. SERVER : A server is a computer or system that provides resources, data, services, or programs to other computers, known as clients, over a network.
  3. SERVER IP : IP address is short for Internet Protocol address and is a string of numbers that usually looks something like this: 23.65. 75.88.
  4. REQUEST : The part where you enter the URL and its send to server its called a request.
  5. RESPONSE : What you get back from the server and displayed on your browser is response.


So whatever domain we have, we have to connect it with the IP Address where we are going to store our files. This IP Address we can add or change in our Domain’s DNS Server settings.

Once its done correctly.  You can enter the domain name or URL in browser’s address bar. Then your browser will connect with DNS and DNS will share the linked IP Address with the browser and then browser will make a request for that IP Address and finally the source code is displayed.

Divyanshi Juneja - Web Developer & UX Designer

About Author : Divyanshi Juneja has been running a Web Development Agency, Trends Creator & also a Web Development & UI/UX Instructor. Feel free to Get In Touch with Divyanshi in case of any query.

Let me know in comments if this article was helpful or you have any related question.

Share The Article

Leave a Comment

Your email address will not be published. Required fields are marked *

Sign Up!

Receive notifications directly to your Email.

    Recent Posts


    Best Hosting

    Leave a Comment

    Your email address will not be published. Required fields are marked *