What happens when you type https://www.google.com in your browser and press Enter?

What happens when you type https://www.google.com in your browser and press Enter?

As an internet user, you have probably searched for a website or information on your browser at some point. Ever wonder how your browser brings up the results almost instantaneously after you type in a command? Well, various complex processes take place in the background to make this seemingly easy task possible.

This article aims to explain these processes in detail with the help of illustrations, breaking down all the technicalities and complexities behind our browser commands into simpler and smaller pieces for better understanding.

The following concepts will be discussed in this article:

  • DNS Request

  • TCP/IP

  • Firewall

  • HTTPS/SSL

  • Load Balancer

  • Web Server

  • Application Server

  • Database

DNS Request

When you type in a URL, the browser considers the domain name of the website, which is generally preceded by "www." and followed by a domain extension such as ".com", ".org", etc. This is where the Domain Name System (DNS) comes into play. The DNS acts as a translator of domain names to IP addresses, which are unique numerical addresses assigned to every device connected to the internet. Browsers use this IP address to locate and fetch the website's content from the server and display it to the user.

To add light, let's clarify the differences between a domain name and an IP address. The domain name of a website is a name entered into the browser to access a website. An example of a domain name from the above URL is google.com. On the other hand, an IP(Internet Protocol) address is a series of numbers that does the same thing as the domain name. However, IP addresses are not as user-friendly as domain names since they consist only of numbers. Domain names were created to help humans remember website addresses more easily.

TCP/IP

Once the IP address is obtained, the Transmission Control Protocol and Internet Protocol (TCP/IP) come into play. TCP/IP is a set of standardized rules that enables communication between computers. IP obtains the machine's address where data is to be sent and ensures that the data packets have been sent to the right destination, and TCP delivers the data once the IP is found.

It's important to note that in this context, IP refers to the IP of the device where the request was sent and not the IP address of the website.

Firewall

A firewall is a security system that monitors the flow of internet traffic to, from, or within a private network. It achieves this by examining the data packets against a set of predefined rules and allowing them access if they meet the criteria. This process helps to prevent unauthorized web activities and stops any malicious activity from occurring both inside and outside the private network.

HTTPS/SSL

Hypertext Transfer Protocol Secure (HTTPS) is the secure version of HTTP. It is the primary protocol used for secure communication between a web browser and your website. SSL, or Secure Sockets Layer, is an encryption-based Internet security protocol.

These two are incorporated into a website to ensure safe communication especially when privacy security is needed.

Load-balancer

When a user makes a request in the browser, the request is received and distributed by the load balancer to different servers. The load balancer assigns the request to a given server, and this process repeats for each request. Load balancers determine which server should handle each request based on several different algorithms.

This reduces the strain on each server and makes the servers more efficient, speeding up performance and reducing latency.

Web Server

After the load balancing process, the web server responds to user requests using HTTP (Hypertext Transfer Protocol) or other protocols. It delivers the site's content to the user, which typically includes the front end of the site, and ensures that the user receives appropriate responses. The web server communicates with the application server to accomplish this task.

Application Server

The web server and the application server are two components that work together in a system. When a user requests to access a website, The load balancer disperses this request to a web server which in turn, passes this request to the application server. The application server is responsible for generating a response based on the request received and sends it back to the web server. The web server then displays the response to the user. This way, the application server serves as the middle layer between the web server and the database.

Database

When a request is received by the application server from the web server, it accesses the database to fetch information related to the query. Once the data is retrieved, it is sent back to the webserver to be displayed. The database is responsible for storing, managing, and retrieving data.

Once all the necessary processes are completed, the response is sent to the user through their browser. This process is what displays the front-end content of a website, such as Google.com. These processes occur so quickly that we usually do not notice them.

In summary, the complex actions that occur when you type a web address into your computer or mobile device can be fascinating. This article has broken down each aspect of the process to help you better understand it.