Accessing a URL from the Browser
Published: 2021-10-09 10:09:46

You enter a URL into the browser's address bar and hit ‘Enter'. The first thing the browser does is following a certain procedure to find the actual Internet Protocol address of the server having access to the content of the website you are trying to visit.

I'm sure you have already heard of the Internet Protocol address as the **IP address**. The IP address is just a number uniquely identifying a server connected to the internet, which is just a network of computers using this Internet Protocol to communicate with each other. Don't worry about the Internet Protocol, the details of IP addresses or the procedure of getting these. Getting IP addresses involves your browser communicating with different servers of the Domain Name System a.k.a. **DNS**. However, this is one of the rabbit holes you don't need to go down for now.

![The browser checks if it knows the IP address of a domain name](https://kmapper.com/assets/images/tutorials/accessing-url/accessing-url-1_en.png)

![The browser doesn't know the IP address so it goes along and asks the DNS servers](https://kmapper.com/assets/images/tutorials/accessing-url/accessing-url-2_en.png)

![The DNS servers are kind enough to hand over the IP address to the browser](https://kmapper.com/assets/images/tutorials/accessing-url/accessing-url-3_en.png)

Once your browser knows the IP address of the server it needs to communicate with, it goes along and sends a so-called **request** to this server. The browser basically asks for an initial **response** from the server which tells the browser what to display and whether to request additional **resources** or not.

The server on the other hand will check what actions have to be taken to answer the browser’s request. Maybe the resource the browser is asking for is already prepared and ready to be served so the server can respond right away. Or the request is handed over to the so-called backend of the website you are trying to visit. No need to go into the details of the backend. Just note that in the backend an endless variety of different processes could take place to create the response to the browser’s request. This might involve checking whether you are authorized to request the resource at all. It might also involve querying one or several databases, making additional requests to other servers, performing some calculations, etc.

Assuming you are authorized to make the request and you are visiting a regular website with content for humans (as opposed to content for other computer programs), the server will probably answer the request with an **HTML** (Hypertext Markup Language) response. For now, don't worry about the details of HTML. It's just one way of formatting website content so your browser can easily read it.

You should know, however, that this initial HTML response usually lists additional URLs with resources your browser will need to request as well in order to correctly display the website you are trying to visit. This includes **images**, **CSS** (cascading style sheets) with information about how to style the content of the website (e.g. colors, font sizes, spacings between paragraphs, etc.), and **JavaScript** code with instructions on how to interact with the website (what should happen when clicking a button, etc.). So, your browser goes through this HTML response, checks for URLs of additional resources listed, and requests all the listed resources in the same manner as it did before. By the way, these additional resources might or might not be located at the same IP address the initial request was made to. As before, for now, don't worry about how CSS and JavaScript works.

![The browser makes a request to the now known IP address](https://kmapper.com/assets/images/tutorials/accessing-url/accessing-url-4_en.png)

![The server checks the browser's request](https://kmapper.com/assets/images/tutorials/accessing-url/accessing-url-5_en.png)

![The server responds with HTML](https://kmapper.com/assets/images/tutorials/accessing-url/accessing-url-6_en.png)

By now, your browser has made all the needed requests and, hopefully, got back responses with all the needed resources to display the website to you. All these resources now live on your computer, making up the **frontend** of the website which you interact with.

![The browser has all responses needed to display the frontend](https://kmapper.com/assets/images/tutorials/accessing-url/accessing-url-7_en.png)