What happens when we click google.com?

I know as a regular internet users, most of us are unfamiliar about what happens behind the scenes when we type google.com technically. Today we will take a closer look and have a deeper understanding about how we get to the page.
Let’s begin with the presumption that you open up a page on your web browser and use the search box typing “google.com” Actually, https://www.google.com is the full URL. Hyper Text Transfer Protocol Secure (HTTPS) in this case, allows for a secure -encrypted- web connection.
We all know that the computer language actually is just the numbers. Here the name “google” stands for an IP number actually. Any address we see, type or visit on internet everyday actually stands for a unique IP address. But why we are not using these numbers? To answer this, let me ask you a question. Who could be able to keep the mixed numbers in mind to get to a website? Of course it wouldn’t be user friendly. We have a system called DNS (Domain Name System). Thanks to Domain Name system, instead of typing the IP addresses (which means numbers actually), we just type the website names which are easy to remember and unique. We can say that DNS is a data based naming system that keeps those names with their assigned IPs and help us get to the websites by resolving the names into numbers behind.
To successfully reach to a website, our computer needs to find DNS record of the website name. To do that, it needs to check four caches respectively.
Caches are temporary storages in the client’s web browser that store previously downloaded web resources. Cache is checked for a cached copy of the requested webpage before the request is sent to the web server. If a valid cached copy is found, it can be used to speed up webpage loading times, as it avoids the need to bring the content from the web server.
The first place our computer will look up for an IP is the web browser cache. Our web browsers keep the records of the websites for a time. So this is the first place to check on for an IP.
The next place will be the operating system cache. Our operating system is also keeping the record of DNS cache.
After that our computer will ask the router. Routers also keep the cache of DNS records.
The last cache just before going to DNS is the Internet Service Provider cache. The computer will check ISP which is also keeping the record of DNS cache.
If a valid cached IP address is found and has not expired, it can be used to establish a connection with the web server immediately, bypassing the need for further DNS resolution. If a valid cached IP address is not found, DNS Resolution will finally take place.
The DNS server looks up the IP address associated with the domain name in its database and returns it to the browser. DNS servers play a critical role in the functioning of the Internet, enabling users to access websites and other resources using human-readable domain names instead of IP addresses. They facilitate the translation of domain names into IP addresses, allowing devices to locate each other on the Internet and enabling seamless communication across the global network.
Upon receiving the resolved IP address from the DNS server, the web browser establishes a connection with the server associated with that IP address in order to transfer data. This connection is built using various Internet protocols, with TCP (Transmission Control Protocol) being the most widely used protocol for many types of HTTP (Hypertext Transfer Protocol) requests.
When the TCP connection is successfully established between the web browser and the server, the data transfer process begins.
The web server receives the HTTP request and generates an HTTP response that contains the requested webpage’s content, along with appropriate HTTP headers. Your web browser processes the HTML, CSS, and JavaScript code in the response to render the webpage. Once the webpage is rendered, your web browser displays it in the browser window, allowing you to interact with the webpage and view its content.
Wow! So many steps but why? These are all happening to give you a good data transfer time, and these processes all happening under a second.
I hope this article gives you a perspective on what processes actually happening by simply typing a url and hitting the enter!